mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-25 16:11:24 +08:00
Merge pull request #28460 from danwbyrne/elegant-spinner
adds typings for the 'elegant-spinner' package
This commit is contained in:
8
types/elegant-spinner/elegant-spinner-tests.ts
Normal file
8
types/elegant-spinner/elegant-spinner-tests.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import elegantSpinner = require('elegant-spinner');
|
||||
|
||||
const frameFunction = elegantSpinner();
|
||||
|
||||
// $ExpectType string
|
||||
frameFunction();
|
||||
|
||||
const frames = elegantSpinner.frames;
|
||||
12
types/elegant-spinner/index.d.ts
vendored
Normal file
12
types/elegant-spinner/index.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// Type definitions for elegant-spinner 1.0
|
||||
// Project: https://github.com/sindresorhus/elegant-spinner
|
||||
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = elegantSpinner;
|
||||
|
||||
declare function elegantSpinner(): () => string;
|
||||
|
||||
declare namespace elegantSpinner {
|
||||
const frames: ReadonlyArray<string>;
|
||||
}
|
||||
19
types/elegant-spinner/tsconfig.json
Normal file
19
types/elegant-spinner/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"elegant-spinner-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/elegant-spinner/tslint.json
Normal file
3
types/elegant-spinner/tslint.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user