mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
Added declarations for 'ityped'. (#13812)
This commit is contained in:
15
ityped/index.d.ts
vendored
Normal file
15
ityped/index.d.ts
vendored
Normal 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
18
ityped/ityped-tests.ts
Normal 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
20
ityped/tsconfig.json
Normal 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
1
ityped/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Reference in New Issue
Block a user