[is-svg] introduce typings (#18265)

This commit is contained in:
Dimitri Benin 2017-07-21 00:57:27 +02:00 committed by Wesley Wigham
parent 0fefe6de39
commit 5b68a7c6bb
4 changed files with 34 additions and 0 deletions

8
types/is-svg/index.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
// Type definitions for is-svg 2.1
// Project: https://github.com/sindresorhus/is-svg#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = isSvg;
declare function isSvg(input: string): boolean;

View File

@ -0,0 +1,3 @@
import isSvg = require('is-svg');
const result: boolean = isSvg('<svg xmlns="http://www.w3.org/2000/svg"><path fill="#00CD9F"/></svg>');

View File

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

1
types/is-svg/tslint.json Normal file
View File

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