mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-15 09:37:52 +08:00
Add typings for common-prefix (#27195)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
bf441f07a9
commit
6994703ab6
4
types/common-prefix/common-prefix-tests.ts
Normal file
4
types/common-prefix/common-prefix-tests.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import common = require('common-prefix'); // common is(string: ReadOnlyArray<string>) => string
|
||||
|
||||
// $ExpectType string
|
||||
common(['a']);
|
||||
8
types/common-prefix/index.d.ts
vendored
Normal file
8
types/common-prefix/index.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// Type definitions for common-prefix 1.1
|
||||
// Project: https://github.com/hughsk/common-prefix
|
||||
// Definitions by: Sean Marvi Oliver Genabe <https://github.com/seangenabe>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function common(strings: ReadonlyArray<string>): string;
|
||||
|
||||
export = common;
|
||||
23
types/common-prefix/tsconfig.json
Normal file
23
types/common-prefix/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es5"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"common-prefix-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/common-prefix/tslint.json
Normal file
1
types/common-prefix/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user