[rfc2047] Add type definitions for v2.0.x (#18686)

This commit is contained in:
Masanori Ohgita
2017-08-09 06:08:13 +09:00
committed by Mohamed Hegazy
parent 49a86971ef
commit 71e42e2b62
4 changed files with 45 additions and 0 deletions

18
types/rfc2047/index.d.ts vendored Normal file
View File

@@ -0,0 +1,18 @@
// Type definitions for rfc2047 2.0
// Project: https://github.com/One-com/rfc2047
// Definitions by: Masanori Ohgita <https://github.com/mugifly>
// 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;

View File

@@ -0,0 +1,4 @@
import * as rfc2047 from "rfc2047";
rfc2047.decode(""); // $ExpectType string
rfc2047.encode(""); // $ExpectType string

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

View File

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