diff --git a/types/decode-uri-component/decode-uri-component-tests.ts b/types/decode-uri-component/decode-uri-component-tests.ts new file mode 100644 index 0000000000..dfcd379031 --- /dev/null +++ b/types/decode-uri-component/decode-uri-component-tests.ts @@ -0,0 +1,12 @@ +import decodeUriComponent = require('decode-uri-component'); + +// $ExpectType string +decodeUriComponent('%25'); +decodeUriComponent('%'); +decodeUriComponent('st%C3%A5le'); +decodeUriComponent('%st%C3%A5le%'); +decodeUriComponent('%%7Bst%C3%A5le%7D%'); +decodeUriComponent('%7B%ab%%7C%de%%7D'); +decodeUriComponent('%FE%FF'); +decodeUriComponent('%C2'); +decodeUriComponent('%C2%B5'); diff --git a/types/decode-uri-component/index.d.ts b/types/decode-uri-component/index.d.ts new file mode 100644 index 0000000000..a1649d5830 --- /dev/null +++ b/types/decode-uri-component/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for decode-uri-component 0.2 +// Project: https://github.com/samverschueren/decode-uri-component#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = decodeUriComponent; + +declare function decodeUriComponent(encodedURI: string): string; diff --git a/types/decode-uri-component/tsconfig.json b/types/decode-uri-component/tsconfig.json new file mode 100644 index 0000000000..dfd7bc27ca --- /dev/null +++ b/types/decode-uri-component/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", + "decode-uri-component-tests.ts" + ] +} diff --git a/types/decode-uri-component/tslint.json b/types/decode-uri-component/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/decode-uri-component/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }