Added declarations for 'ityped'. (#13812)

This commit is contained in:
Daniel Rosenwasser
2017-01-06 13:22:39 -05:00
committed by Andy
parent eefa08623f
commit 74dc4fdeb9
4 changed files with 54 additions and 0 deletions

15
ityped/index.d.ts vendored Normal file
View File

@@ -0,0 +1,15 @@
// Type definitions for ityped 0.0
// Project: https://github.com/luisvinicius167/ityped
// Definitions by: Daniel Rosenwasser <https://github.com/DanielRosenwasser>
// 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;

18
ityped/ityped-tests.ts Normal file
View File

@@ -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", {});

20
ityped/tsconfig.json Normal file
View File

@@ -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"
]
}

1
ityped/tslint.json Normal file
View File

@@ -0,0 +1 @@
{ "extends": "../tslint.json" }