add svg-tag-names (#45300)

* add svg-tag-names

* Create tsconfig.json

* Create tslint.json

* Create svg-tag-names.ts

* Rename svg-tag-names.ts to svg-tag-names-tests.ts

* Fix errors

Co-authored-by: Dmitry Demensky <dmitry@demensky.com>
This commit is contained in:
Sergey Sova 2020-06-25 17:41:10 +03:00 committed by GitHub
parent b4c1c820e6
commit 957cc208bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 133 additions and 0 deletions

106
types/svg-tag-names/index.d.ts vendored Normal file
View File

@ -0,0 +1,106 @@
// Type definitions for svg-tag-names 2.0
// Project: https://github.com/wooorm/svg-tag-names
// Definitions by: Sergey Sova <https://github.com/sergeysova>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace svgTags {
type SVGTags =
| 'a'
| 'altGlyph'
| 'altGlyphDef'
| 'altGlyphItem'
| 'animate'
| 'animateColor'
| 'animateMotion'
| 'animateTransform'
| 'animation'
| 'audio'
| 'canvas'
| 'circle'
| 'clipPath'
| 'color-profile'
| 'cursor'
| 'defs'
| 'desc'
| 'discard'
| 'ellipse'
| 'feBlend'
| 'feColorMatrix'
| 'feComponentTransfer'
| 'feComposite'
| 'feConvolveMatrix'
| 'feDiffuseLighting'
| 'feDisplacementMap'
| 'feDistantLight'
| 'feDropShadow'
| 'feFlood'
| 'feFuncA'
| 'feFuncB'
| 'feFuncG'
| 'feFuncR'
| 'feGaussianBlur'
| 'feImage'
| 'feMerge'
| 'feMergeNode'
| 'feMorphology'
| 'feOffset'
| 'fePointLight'
| 'feSpecularLighting'
| 'feSpotLight'
| 'feTile'
| 'feTurbulence'
| 'filter'
| 'font'
| 'font-face'
| 'font-face-format'
| 'font-face-name'
| 'font-face-src'
| 'font-face-uri'
| 'foreignObject'
| 'g'
| 'glyph'
| 'glyphRef'
| 'handler'
| 'hkern'
| 'iframe'
| 'image'
| 'line'
| 'linearGradient'
| 'listener'
| 'marker'
| 'mask'
| 'metadata'
| 'missing-glyph'
| 'mpath'
| 'path'
| 'pattern'
| 'polygon'
| 'polyline'
| 'prefetch'
| 'radialGradient'
| 'rect'
| 'script'
| 'set'
| 'solidColor'
| 'stop'
| 'style'
| 'svg'
| 'switch'
| 'symbol'
| 'tbreak'
| 'text'
| 'textArea'
| 'textPath'
| 'title'
| 'tref'
| 'tspan'
| 'unknown'
| 'use'
| 'video'
| 'view'
| 'vkern';
}
declare const svgTags: svgTags.SVGTags[];
export = svgTags;

View File

@ -0,0 +1,3 @@
import * as svgTags from 'svg-tag-names';
svgTags; // $ExpectType SVGTags[]

View 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",
"svg-tag-names-tests.ts"
]
}

View File

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