mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 21:40:21 +00:00
Type definitions for siema
This commit is contained in:
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
// Type definitions for siema
|
||||
// Project: https://github.com/pawelgrzybek/siema
|
||||
// Definitions by: Irmantas Zenkus <https://github.com/Irmiz>
|
||||
// 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;
|
||||
}
|
||||
|
||||
class Siema {
|
||||
public currentSlide: number;
|
||||
|
||||
constructor(options?: SiemaOptions);
|
||||
|
||||
public next(): void;
|
||||
public prev(): void;
|
||||
public goTo(index: number): void;
|
||||
}
|
||||
|
||||
export = Siema;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import Siema = require('siema');
|
||||
|
||||
const siema = new Siema({
|
||||
selector: '.siema',
|
||||
duration: 200,
|
||||
easing: 'ease-out',
|
||||
perPage: 1,
|
||||
startIndex: 0,
|
||||
draggable: true,
|
||||
threshold: 20,
|
||||
loop: false,
|
||||
});
|
||||
|
||||
siema.next();
|
||||
siema.prev();
|
||||
siema.goTo(0);
|
||||
siema.currentSlide;
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"siema-tests.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user