1 | // Type definitions for base64-js 1.3
|
2 | // Project: https://github.com/beatgammit/base64-js
|
3 | // Definitions by: Peter Safranek <https://github.com/pe8ter>
|
4 | // Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
5 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
6 |
|
7 | /**
|
8 | * Takes a base64 string and returns length of byte array
|
9 | */
|
10 | export function byteLength(encoded: string): number;
|
11 | /**
|
12 | * Takes a base64 string and returns a byte array
|
13 | */
|
14 | export function toByteArray(encoded: string): Uint8Array;
|
15 | /**
|
16 | * Takes a byte array and returns a base64 string
|
17 | */
|
18 | export function fromByteArray(bytes: Uint8Array): string;
|
19 |
|
20 | /**
|
21 | * base64-js does basic base64 encoding/decoding in pure JS.
|
22 | */
|
23 | export as namespace base64js;
|