From 957cc208bd30320a1ce90937898343014bfd3005 Mon Sep 17 00:00:00 2001 From: Sergey Sova <5620073+sergeysova@users.noreply.github.com> Date: Thu, 25 Jun 2020 17:41:10 +0300 Subject: [PATCH] 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 --- types/svg-tag-names/index.d.ts | 106 +++++++++++++++++++++ types/svg-tag-names/svg-tag-names-tests.ts | 3 + types/svg-tag-names/tsconfig.json | 23 +++++ types/svg-tag-names/tslint.json | 1 + 4 files changed, 133 insertions(+) create mode 100644 types/svg-tag-names/index.d.ts create mode 100644 types/svg-tag-names/svg-tag-names-tests.ts create mode 100644 types/svg-tag-names/tsconfig.json create mode 100644 types/svg-tag-names/tslint.json diff --git a/types/svg-tag-names/index.d.ts b/types/svg-tag-names/index.d.ts new file mode 100644 index 0000000000..2e659c9706 --- /dev/null +++ b/types/svg-tag-names/index.d.ts @@ -0,0 +1,106 @@ +// Type definitions for svg-tag-names 2.0 +// Project: https://github.com/wooorm/svg-tag-names +// Definitions by: Sergey Sova +// 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; diff --git a/types/svg-tag-names/svg-tag-names-tests.ts b/types/svg-tag-names/svg-tag-names-tests.ts new file mode 100644 index 0000000000..a8a4c96879 --- /dev/null +++ b/types/svg-tag-names/svg-tag-names-tests.ts @@ -0,0 +1,3 @@ +import * as svgTags from 'svg-tag-names'; + +svgTags; // $ExpectType SVGTags[] diff --git a/types/svg-tag-names/tsconfig.json b/types/svg-tag-names/tsconfig.json new file mode 100644 index 0000000000..0cebd04e86 --- /dev/null +++ b/types/svg-tag-names/tsconfig.json @@ -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" + ] +} diff --git a/types/svg-tag-names/tslint.json b/types/svg-tag-names/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/svg-tag-names/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }