[js gpio] set pin mode on gpio setWatch()