diff --git a/ityped/index.d.ts b/ityped/index.d.ts new file mode 100644 index 0000000000..135ea870ca --- /dev/null +++ b/ityped/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for ityped 0.0 +// Project: https://github.com/luisvinicius167/ityped +// Definitions by: Daniel Rosenwasser +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Configuration { + strings?: string[]; + typeSpeed?: number; + pause?: number; + loop?: boolean; +} + +export function init(element: string, config: Configuration): void; + +export as namespace ityped; \ No newline at end of file diff --git a/ityped/ityped-tests.ts b/ityped/ityped-tests.ts new file mode 100644 index 0000000000..b03d976ec1 --- /dev/null +++ b/ityped/ityped-tests.ts @@ -0,0 +1,18 @@ +import { init } from "ityped"; + +const config = { + strings: [ + "Strings!", + ], + typeSpeed: 120, + pause: 500, + loop: true +}; + +init("#selector", config); + +init("#anotherSelector", { + loop: false +}); + +init("#anotherOne", {}); \ No newline at end of file diff --git a/ityped/tsconfig.json b/ityped/tsconfig.json new file mode 100644 index 0000000000..101d9e3dd3 --- /dev/null +++ b/ityped/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ityped-tests.ts" + ] +} diff --git a/ityped/tslint.json b/ityped/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/ityped/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" }