mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
dom-matches: add types/tests (#41399)
This commit is contained in:
parent
2d34dc1046
commit
54bbfdba60
4
types/dom-matches/dom-matches-tests.ts
Normal file
4
types/dom-matches/dom-matches-tests.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import matches = require('dom-matches');
|
||||
|
||||
const elem = document.querySelector('.foo');
|
||||
matches(elem, '.foo'); // $ExpectType boolean
|
||||
7
types/dom-matches/index.d.ts
vendored
Normal file
7
types/dom-matches/index.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// Type definitions for dom-matches 2.0
|
||||
// Project: https://github.com/necolas/dom-matches
|
||||
// Definitions by: Avi Vahl <https://github.com/AviVahl>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function matches(element: Element | null | undefined, selector: string): boolean;
|
||||
export = matches;
|
||||
24
types/dom-matches/tsconfig.json
Normal file
24
types/dom-matches/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"dom-matches-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/dom-matches/tslint.json
Normal file
1
types/dom-matches/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user