mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 14:38:20 +08:00
Add filter-invalid-dom-props (#25316)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
import filterInvalidDomProps from 'filter-invalid-dom-props';
|
||||
|
||||
// $ExpectType Partial<{ notADomProp: boolean; }>
|
||||
filterInvalidDomProps({ notADomProp: true });
|
||||
11
types/filter-invalid-dom-props/index.d.ts
vendored
Normal file
11
types/filter-invalid-dom-props/index.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// Type definitions for filter-invalid-dom-props 2.0
|
||||
// Project: https://www.npmjs.com/package/filter-invalid-dom-props
|
||||
// Definitions by: icopp <https://github.com/icopp>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
// Note that the below can't actually be fully typed in the latest version of
|
||||
// Typescript, because there's no way to regex-match against `data-` or `aria-`
|
||||
// (which this function allows in addition to a list of static props).
|
||||
|
||||
export default function filterInvalidDOMProps<T>(props: T): Partial<T>;
|
||||
23
types/filter-invalid-dom-props/tsconfig.json
Normal file
23
types/filter-invalid-dom-props/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",
|
||||
"filter-invalid-dom-props-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/filter-invalid-dom-props/tslint.json
Normal file
1
types/filter-invalid-dom-props/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user