Improve base64js types (#12135)

This commit is contained in:
Andy 2016-10-20 13:43:06 -07:00 committed by GitHub
parent b06c56b70b
commit 47feec0e12
3 changed files with 8 additions and 8 deletions

View File

@ -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));

View File

@ -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;

View File

@ -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"
]
}