mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
jBinary
* Added static methods of jBinary class
This commit is contained in:
parent
90e4370042
commit
73325dbcab
@ -1,5 +1,8 @@
|
||||
/// <reference path="jbinary.d.ts" />
|
||||
|
||||
jBinary.loadData([0x05, 0x03, 0x7F, 0x1E]);
|
||||
jBinary.load([0x05, 0x03, 0x7F, 0x1E]);
|
||||
|
||||
var originalData = [0x05, 0x03, 0x7F, 0x1E];
|
||||
var b1 = new jBinary(originalData);
|
||||
console.log(b1.readAll());
|
||||
@ -14,3 +17,6 @@ b1.write('int8', 0x9A, 2);
|
||||
b1.writeAll(originalData);
|
||||
|
||||
console.log(b1.slice(0, 2));
|
||||
|
||||
jBinary.saveAs('myfile.pdf', 'application/pdf');
|
||||
jBinary.toURI();
|
||||
|
||||
6
jbinary/jbinary.d.ts
vendored
6
jbinary/jbinary.d.ts
vendored
@ -13,6 +13,12 @@
|
||||
declare class jBinary
|
||||
{
|
||||
|
||||
static loadData(source:any, callback?: (error:string, data:any) => any):any;
|
||||
static load(source:any, typeSet?:any, callback?: (error:string, data:any) => any):any;
|
||||
|
||||
static saveAs(destination:any, mimeType?:string, callback?: (error:string, data:any) => any):any;
|
||||
static toURI(mimeType?:string):any;
|
||||
|
||||
constructor(data:Array<number>);
|
||||
constructor(data:jDataView, typeSet:Object);
|
||||
constructor(bufferSize:number, typeSet:Object);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user