have refs in d.ts file instead of .ts file

This commit is contained in:
Florian Dold 2016-10-19 23:40:45 +02:00
parent 67e0e02ee0
commit 9ccc6626ac
4 changed files with 56 additions and 52 deletions

View File

@ -95,7 +95,7 @@ declare var FileSaver: {
* This constructor must be visible when the script's global object is either a Window object or an object implementing the WorkerUtils interface. * This constructor must be visible when the script's global object is either a Window object or an object implementing the WorkerUtils interface.
*/ */
new(data:Blob): FileSaver; new(data:Blob): FileSaver;
} };
/** /**
* This interface expands on the FileSaver interface to allow for multiple write actions, rather than just saving a single Blob. * This interface expands on the FileSaver interface to allow for multiple write actions, rather than just saving a single Blob.

76
lib/decl/lib.es6.d.ts vendored
View File

@ -20288,44 +20288,44 @@ declare function addEventListener(type: "mouseenter", listener: (this: Window, e
declare function addEventListener(type: "mouseleave", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "mouseleave", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "mousemove", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "mousemove", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "mouseout", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "mouseout", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "mouseover", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "mouseover", listener: (this: Window, MouseEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "mouseup", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "mouseup", listener: (this: Window, MouseEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "mousewheel", listener: (this: Window, ev: WheelEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "mousewheel", listener: (this: Window, WheelEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "offline", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "offline", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "online", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "online", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "orientationchange", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "orientationchange", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pagehide", listener: (this: Window, ev: PageTransitionEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "pagehide", listener: (this: Window, PageTransitionEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pageshow", listener: (this: Window, ev: PageTransitionEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "pageshow", listener: (this: Window, PageTransitionEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pause", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "pause", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "play", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "play", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "playing", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "playing", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pointercancel", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "pointercancel", listener: (this: Window, PointerEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pointerdown", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "pointerdown", listener: (this: Window, PointerEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pointerenter", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "pointerenter", listener: (this: Window, PointerEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pointerleave", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "pointerleave", listener: (this: Window, PointerEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pointermove", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "pointermove", listener: (this: Window, PointerEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pointerout", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "pointerout", listener: (this: Window, PointerEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pointerover", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "pointerover", listener: (this: Window, PointerEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "pointerup", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "pointerup", listener: (this: Window, PointerEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "popstate", listener: (this: Window, ev: PopStateEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "popstate", listener: (this: Window, PopStateEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "progress", listener: (this: Window, ev: ProgressEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "progress", listener: (this: Window, ProgressEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "ratechange", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "ratechange", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "readystatechange", listener: (this: Window, ev: ProgressEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "readystatechange", listener: (this: Window, ProgressEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "reset", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "reset", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "resize", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "resize", listener: (this: Window, UIEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "scroll", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "scroll", listener: (this: Window, UIEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "seeked", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "seeked", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "seeking", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "seeking", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "select", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "select", listener: (this: Window, UIEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "stalled", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "stalled", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "storage", listener: (this: Window, ev: StorageEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "storage", listener: (this: Window, StorageEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "submit", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "submit", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "suspend", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "suspend", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "timeupdate", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "timeupdate", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "unload", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "unload", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "volumechange", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "volumechange", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "waiting", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "waiting", listener: (this: Window, Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "wheel", listener: (this: Window, ev: WheelEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "wheel", listener: (this: Window, WheelEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
type AAGUID = string; type AAGUID = string;
type AlgorithmIdentifier = string | Algorithm; type AlgorithmIdentifier = string | Algorithm;

6
lib/refs.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
// Help the TypeScript compiler find declarations.
/// <reference path="decl/lib.es6.d.ts" />
/// <reference path="decl/urijs/URIjs.d.ts" />
/// <reference path="decl/systemjs/systemjs.d.ts" />

View File

@ -1273,20 +1273,18 @@ export class Wallet {
.iter(Stores.exchanges) .iter(Stores.exchanges)
.reduce(collectSmallestWithdraw, {})); .reduce(collectSmallestWithdraw, {}));
console.log("smallest withdraws", smallestWithdraw) console.log("smallest withdraws", smallestWithdraw);
await (this.q()
.iter(Stores.coins)
.reduce(collectBalances, balance));
await (this.q() let tx = this.q();
.iter(Stores.refresh) tx.iter(Stores.coins)
.reduce(collectPendingRefresh, balance)); .reduce(collectBalances, balance);
await (this.q() tx.iter(Stores.refresh)
.iter(Stores.reserves) .reduce(collectPendingRefresh, balance);
.reduce(collectPendingWithdraw, balance)); tx.iter(Stores.reserves)
await (this.q() .reduce(collectPendingWithdraw, balance);
.iter(Stores.transactions) tx.iter(Stores.transactions)
.reduce(collectPayments, balance)); .reduce(collectPayments, balance);
await tx.finish();
return balance; return balance;
} }