mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[@wordpress/token-list] add new definitions (#36689)
This commit is contained in:
parent
d2bf4fe0fa
commit
1ebc560f81
11
types/wordpress__token-list/index.d.ts
vendored
Normal file
11
types/wordpress__token-list/index.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Type definitions for @wordpress/token-list 1.4
|
||||
// Project: https://github.com/WordPress/gutenberg/tree/master/packages/token-list/README.md
|
||||
// Definitions by: Derek Sifford <https://github.com/dsifford>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.5
|
||||
|
||||
declare const TokenList: {
|
||||
new (initialValue?: string): DOMTokenList;
|
||||
};
|
||||
|
||||
export default TokenList;
|
||||
19
types/wordpress__token-list/tsconfig.json
Normal file
19
types/wordpress__token-list/tsconfig.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["dom", "es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"@wordpress/token-list": ["wordpress__token-list"]
|
||||
}
|
||||
},
|
||||
"files": ["index.d.ts", "wordpress__token-list-tests.ts"]
|
||||
}
|
||||
1
types/wordpress__token-list/tslint.json
Normal file
1
types/wordpress__token-list/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@ -0,0 +1,7 @@
|
||||
import TokenList from '@wordpress/token-list';
|
||||
|
||||
// $ExpectType DOMTokenList
|
||||
new TokenList();
|
||||
|
||||
// $ExpectType DOMTokenList
|
||||
const list = new TokenList('foo bar');
|
||||
Loading…
Reference in New Issue
Block a user