mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Improve base64js types (#12135)
This commit is contained in:
parent
b06c56b70b
commit
47feec0e12
@ -1,6 +1,5 @@
|
||||
/// <reference path="base64-js.d.ts" />
|
||||
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));
|
||||
|
||||
5
base64-js/index.d.ts
vendored
5
base64-js/index.d.ts
vendored
@ -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 <https://github.com/pe8ter>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function byteLength(encoded: string): number;
|
||||
export function toByteArray(encoded: string): Uint8Array;
|
||||
export function fromByteArray(bytes: Uint8Array): string;
|
||||
export function fromByteArray(bytes: Uint8Array): string;
|
||||
|
||||
@ -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"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user