mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
fix onoff type errors
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/// <reference path="onoff" />
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
import * as onoff from 'onoff';
|
||||
|
||||
var led:onoff.Gpio = new onoff.Gpio(17, 'out');
|
||||
@@ -7,7 +9,7 @@ var toggleLed = function():void {
|
||||
led.writeSync(lastState ^ 1);
|
||||
};
|
||||
|
||||
var intervalId:number = setInterval(toggleLed, 100);
|
||||
var intervalId:NodeJS.Timer = setInterval(toggleLed, 100);
|
||||
|
||||
setTimeout(function() {
|
||||
clearInterval(intervalId);
|
||||
|
||||
Vendored
+1
-1
@@ -38,7 +38,7 @@ declare namespace __ONOFF {
|
||||
unwatchAll():void;
|
||||
|
||||
direction():string;
|
||||
setDirection(value:string);
|
||||
setDirection(value:string):void;
|
||||
|
||||
edge():string;
|
||||
setEdge(value:string):void;
|
||||
|
||||
Reference in New Issue
Block a user