diff --git a/siema/index.d.ts b/siema/index.d.ts index 7f9fed8cf5..52b6205dad 100644 --- a/siema/index.d.ts +++ b/siema/index.d.ts @@ -1,28 +1,26 @@ -// Type definitions for siema +// Type definitions for siema 1.0 // Project: https://github.com/pawelgrzybek/siema // Definitions by: Irmantas Zenkus // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module 'siema' { - interface SiemaOptions { - selector?: string; - duration?: number; - easing?: string; - perPage?: number; - startIndex?: number; - draggable?: boolean; - threshold?: number; - loop?: boolean; - } +declare class Siema { + currentSlide: number; - class Siema { - public currentSlide: number; + constructor(options?: SiemaOptions); - constructor(options?: SiemaOptions); - - public next(): void; - public prev(): void; - public goTo(index: number): void; - } - - export = Siema; + next(): void; + prev(): void; + goTo(index: number): void; } + +interface SiemaOptions { + selector?: string; + duration?: number; + easing?: string; + perPage?: number; + startIndex?: number; + draggable?: boolean; + threshold?: number; + loop?: boolean; +} + +export = Siema; diff --git a/siema/siema-tests.ts b/siema/siema-tests.ts index b576e8dac6..3851b2b705 100644 --- a/siema/siema-tests.ts +++ b/siema/siema-tests.ts @@ -13,5 +13,4 @@ const siema = new Siema({ siema.next(); siema.prev(); -siema.goTo(0); -siema.currentSlide; +siema.goTo(siema.currentSlide); diff --git a/siema/tsconfig.json b/siema/tsconfig.json index b7b76fb08a..b65c3dc04f 100644 --- a/siema/tsconfig.json +++ b/siema/tsconfig.json @@ -4,7 +4,7 @@ "target": "es6", "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/siema/tslint.json b/siema/tslint.json new file mode 100644 index 0000000000..f9e30021f4 --- /dev/null +++ b/siema/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +}