Merge pull request #23534 from ajafff/void-elements

Add types for 'void-elements'
This commit is contained in:
Daniel Rosenwasser
2018-02-13 11:16:02 -08:00
committed by GitHub
4 changed files with 37 additions and 0 deletions

8
types/void-elements/index.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for void-elements 3.1
// Project: https://github.com/jadejs/void-elements
// Definitions by: Klaus Meinhardt <https://github.com/ajafff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
declare const voidElements: Partial<Record<string, true>>;
export = voidElements;

View File

@@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"esModuleInterop": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"void-elements-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@@ -0,0 +1,4 @@
import * as voidElements from 'void-elements';
let isVoid: boolean | undefined = voidElements.span;
isVoid = voidElements.input;