add declarations for unidecode

This commit is contained in:
Vitor Fernandes 2018-08-21 22:16:48 +01:00
parent 73607eed34
commit b8ac2c066c
No known key found for this signature in database
GPG Key ID: 1230F14A7F9303DE
4 changed files with 35 additions and 0 deletions

8
types/unidecode/index.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
// Type definitions for unidecode 0.1
// Project: https://github.com/FGRibreau/node-unidecode
// Definitions by: Vitor Fernandes <https://github.com/vfernandestoptal>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = unidecode;
declare function unidecode(str: string): string;

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",
"unidecode-tests.ts"
]
}

View File

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

View File

@ -0,0 +1,3 @@
import unidecode = require("unidecode");
const text: string = unidecode("Hello, World");