mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[string-length] Add types
This commit is contained in:
parent
db6e783a97
commit
5895d461b2
8
types/string-length/index.d.ts
vendored
Normal file
8
types/string-length/index.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// Type definitions for string-length 2.0
|
||||
// Project: https://github.com/sindresorhus/string-length#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = stringLength;
|
||||
|
||||
declare function stringLength(input: string): number;
|
||||
4
types/string-length/string-length-tests.ts
Normal file
4
types/string-length/string-length-tests.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import stringLength = require('string-length');
|
||||
|
||||
stringLength('🐴'); // $ExpectType number
|
||||
stringLength('\u001B[1municorn\u001B[22m'); // $ExpectType number
|
||||
23
types/string-length/tsconfig.json
Normal file
23
types/string-length/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"string-length-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/string-length/tslint.json
Normal file
1
types/string-length/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user