diff --git a/types/b64-lite/b64-lite-tests.ts b/types/b64-lite/b64-lite-tests.ts new file mode 100644 index 0000000000..cfa9463d56 --- /dev/null +++ b/types/b64-lite/b64-lite-tests.ts @@ -0,0 +1,7 @@ +import * as b64lite from "b64-lite"; + +b64lite.btoa(""); // $ExpectType string +b64lite.toBase64(""); // $ExpectType string + +b64lite.atob(""); // $ExpectType string +b64lite.fromBase64(""); // $ExpectType string diff --git a/types/b64-lite/index.d.ts b/types/b64-lite/index.d.ts new file mode 100644 index 0000000000..f659a17b4b --- /dev/null +++ b/types/b64-lite/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for b64-lite 1.3 +// Project: https://github.com/kevlened/b64-lite#readme +// Definitions by: JasonHK +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace b64Lite; + +export function btoa(source: string): string; +export function toBase64(source: string): string; + +export function atob(encoded: string): string; +export function fromBase64(encoded: string): string; diff --git a/types/b64-lite/tsconfig.json b/types/b64-lite/tsconfig.json new file mode 100644 index 0000000000..68e9568e05 --- /dev/null +++ b/types/b64-lite/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", + "b64-lite-tests.ts" + ] +} diff --git a/types/b64-lite/tslint.json b/types/b64-lite/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/b64-lite/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }