mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
[rfc2047] Add type definitions for v2.0.x (#18686)
This commit is contained in:
committed by
Mohamed Hegazy
parent
49a86971ef
commit
71e42e2b62
18
types/rfc2047/index.d.ts
vendored
Normal file
18
types/rfc2047/index.d.ts
vendored
Normal 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;
|
||||
4
types/rfc2047/rfc2047-tests.ts
Normal file
4
types/rfc2047/rfc2047-tests.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import * as rfc2047 from "rfc2047";
|
||||
|
||||
rfc2047.decode(""); // $ExpectType string
|
||||
rfc2047.encode(""); // $ExpectType string
|
||||
22
types/rfc2047/tsconfig.json
Normal file
22
types/rfc2047/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
1
types/rfc2047/tslint.json
Normal file
1
types/rfc2047/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user