diff --git a/types/rfc2047/index.d.ts b/types/rfc2047/index.d.ts new file mode 100644 index 0000000000..224ec8bbd0 --- /dev/null +++ b/types/rfc2047/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for rfc2047 2.0 +// Project: https://github.com/One-com/rfc2047 +// Definitions by: Masanori Ohgita +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Decode + * @param {string} encodedText Encoded Text + * @return {string} Decoded Text + */ +export function decode(encodedText: string): string; + +/** + * Encode + * @param {string} decodedText Decoded Text + * @return {string} Encoded Text + */ +export function encode(decodedText: string): string; diff --git a/types/rfc2047/rfc2047-tests.ts b/types/rfc2047/rfc2047-tests.ts new file mode 100644 index 0000000000..f795fe76b2 --- /dev/null +++ b/types/rfc2047/rfc2047-tests.ts @@ -0,0 +1,4 @@ +import * as rfc2047 from "rfc2047"; + +rfc2047.decode(""); // $ExpectType string +rfc2047.encode(""); // $ExpectType string diff --git a/types/rfc2047/tsconfig.json b/types/rfc2047/tsconfig.json new file mode 100644 index 0000000000..ddcd538656 --- /dev/null +++ b/types/rfc2047/tsconfig.json @@ -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", + "rfc2047-tests.ts" + ] +} diff --git a/types/rfc2047/tslint.json b/types/rfc2047/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/rfc2047/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }