From 3a865ff3e243a166a93823cb8496241c4fb978d5 Mon Sep 17 00:00:00 2001 From: Jason Kwok Date: Mon, 15 Apr 2019 22:27:40 +0800 Subject: [PATCH 1/3] Added type definitions for b64-lite 1.3 --- types/b64-lite/b64-lite-tests.ts | 7 +++++++ types/b64-lite/index.d.ts | 12 ++++++++++++ types/b64-lite/tsconfig.json | 23 +++++++++++++++++++++++ types/b64-lite/tslint.json | 1 + 4 files changed, 43 insertions(+) create mode 100644 types/b64-lite/b64-lite-tests.ts create mode 100644 types/b64-lite/index.d.ts create mode 100644 types/b64-lite/tsconfig.json create mode 100644 types/b64-lite/tslint.json 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" } From 900c78145361d28dee61275b843c2fcf20bf242e Mon Sep 17 00:00:00 2001 From: Jason Kwok Date: Tue, 16 Apr 2019 23:34:46 +0800 Subject: [PATCH 2/3] [@types/store] Fixed a typo of a `store` plugin --- types/store/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/store/index.d.ts b/types/store/index.d.ts index e859491aa0..52fd435f41 100644 --- a/types/store/index.d.ts +++ b/types/store/index.d.ts @@ -59,7 +59,7 @@ declare module 'store/src/store-engine' { declare module 'store/plugins/all' { export = Function; } -declare module 'store/plugins/default' { +declare module 'store/plugins/defaults' { export = Function; } declare module 'store/plugins/dump' { From 51fb5bec6255ecba264a75a15014831e1206065c Mon Sep 17 00:00:00 2001 From: Jason Kwok Date: Tue, 16 Apr 2019 23:40:35 +0800 Subject: [PATCH 3/3] Revert "[@types/store] Fixed a typo of a `store` plugin" This reverts commit 900c78145361d28dee61275b843c2fcf20bf242e. --- types/store/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/store/index.d.ts b/types/store/index.d.ts index 52fd435f41..e859491aa0 100644 --- a/types/store/index.d.ts +++ b/types/store/index.d.ts @@ -59,7 +59,7 @@ declare module 'store/src/store-engine' { declare module 'store/plugins/all' { export = Function; } -declare module 'store/plugins/defaults' { +declare module 'store/plugins/default' { export = Function; } declare module 'store/plugins/dump' {