diff --git a/base64-js/base64-js-tests.ts b/base64-js/base64-js-tests.ts index 6852ddb626..13c3f705b5 100644 --- a/base64-js/base64-js-tests.ts +++ b/base64-js/base64-js-tests.ts @@ -1,6 +1,5 @@ -/// +import * as base64js from "base64-js"; -import * as base64js from 'base64-js'; - -const bytes: Uint8Array = base64js.toByteArray('shemp'); +const length: number = base64js.byteLength(""); +const bytes: Uint8Array = base64js.toByteArray(""); const decoded: string = base64js.fromByteArray(new Uint8Array(0)); diff --git a/base64-js/index.d.ts b/base64-js/index.d.ts index a029f384c3..7a38667368 100644 --- a/base64-js/index.d.ts +++ b/base64-js/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for base64-js v1.1.2 +// Type definitions for base64-js 1.2 // Project: https://github.com/beatgammit/base64-js // Definitions by: Peter Safranek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +export function byteLength(encoded: string): number; export function toByteArray(encoded: string): Uint8Array; -export function fromByteArray(bytes: Uint8Array): string; \ No newline at end of file +export function fromByteArray(bytes: Uint8Array): string; diff --git a/base64-js/tsconfig.json b/base64-js/tsconfig.json index dc8ef6a70a..0d0c14d324 100644 --- a/base64-js/tsconfig.json +++ b/base64-js/tsconfig.json @@ -3,7 +3,7 @@ "module": "commonjs", "target": "es6", "noImplicitAny": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -14,6 +14,6 @@ }, "files": [ "index.d.ts", - "base64-js-test.ts" + "base64-js-tests.ts" ] } \ No newline at end of file