Fix lint issues in F1 (#13373)

* Fix lint issues in F1

* Fix lint errors
This commit is contained in:
Mohamed Hegazy
2016-12-15 11:35:32 -08:00
committed by GitHub
parent 6dd42d2c25
commit c097058ddc
2 changed files with 37 additions and 4 deletions

View File

@@ -0,0 +1,31 @@
import F1 = require("f1");
var ui = F1();
ui.states({
out: {
itemToAnimate1: {
variableToAnimate: 0
},
itemToAnimate2: {
variableToAnimate: 0
}
},
idle: {
itemToAnimate1: {
variableToAnimate: 1
},
itemToAnimate2: {
variableToAnimate: 2
}
}
});
ui.transitions( [
{ from: 'idle', to: 'rollOver', animation: { duration: 0.25 } },
{ from: 'rollOver', to: 'idle', animation: { duration: 0.1 } }
]);

10
f1/index.d.ts vendored
View File

@@ -6,8 +6,8 @@
/// <reference types="node" />
interface F1Options {
onState: void;
onUpdate: void;
onState?: (...args: any[]) => void;
onUpdate?: (...args: any[]) => void;
name: string;
@@ -27,10 +27,12 @@ interface F1 extends NodeJS.EventEmitter {
destroy(): void;
apply(): void;
go(state: string, callback?: void): F1;
go(state: string, callback?: (...args: any[]) => void): F1;
set(state: string): F1;
step(deltaTime: number): F1;
update(): F1;
}
declare function f1(settings?: F1Options): F1;
declare function F1(settings?: F1Options): F1;
export = F1;