forked from apollographql/apollo-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit typings to fix apollographql#71
- Loading branch information
Sashko Stubailo
committed
Apr 2, 2016
1 parent
43d9273
commit 2045c26
Showing
27 changed files
with
45,853 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,3 @@ node_modules | |
# don't commit compiled files | ||
lib | ||
test-lib | ||
|
||
# don't commit typescript files | ||
typings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path="browser/ambient/async/index.d.ts" /> | ||
/// <reference path="browser/ambient/chai-as-promised/index.d.ts" /> | ||
/// <reference path="browser/ambient/chai/index.d.ts" /> | ||
/// <reference path="browser/ambient/es6-promise/index.d.ts" /> | ||
/// <reference path="browser/ambient/graphql/index.d.ts" /> | ||
/// <reference path="browser/ambient/isomorphic-fetch/index.d.ts" /> | ||
/// <reference path="browser/ambient/mocha/index.d.ts" /> | ||
/// <reference path="browser/ambient/node/index.d.ts" /> | ||
/// <reference path="browser/ambient/promises-a-plus/index.d.ts" /> | ||
/// <reference path="browser/ambient/redux/index.d.ts" /> | ||
/// <reference path="browser/definitions/lodash/index.d.ts" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
// Generated by typings | ||
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/async/async.d.ts | ||
// Type definitions for Async 1.4.2 | ||
// Project: https://github.com/caolan/async | ||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Arseniy Maximov <https://github.com/kern0>, Joe Herman <https://github.com/Penryn> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
|
||
interface Dictionary<T> { [key: string]: T; } | ||
|
||
interface ErrorCallback { (err?: Error): void; } | ||
interface AsyncResultCallback<T> { (err: Error, result: T): void; } | ||
interface AsyncResultArrayCallback<T> { (err: Error, results: T[]): void; } | ||
interface AsyncResultObjectCallback<T> { (err: Error, results: Dictionary<T>): void; } | ||
|
||
interface AsyncFunction<T> { (callback: (err?: Error, result?: T) => void): void; } | ||
interface AsyncIterator<T> { (item: T, callback: ErrorCallback): void; } | ||
interface AsyncForEachOfIterator<T> { (item: T, key: number, callback: ErrorCallback): void; } | ||
interface AsyncResultIterator<T, R> { (item: T, callback: AsyncResultCallback<R>): void; } | ||
interface AsyncMemoIterator<T, R> { (memo: R, item: T, callback: AsyncResultCallback<R>): void; } | ||
interface AsyncBooleanIterator<T> { (item: T, callback: (truthValue: boolean) => void): void; } | ||
|
||
interface AsyncWorker<T> { (task: T, callback: ErrorCallback): void; } | ||
interface AsyncVoidFunction { (callback: ErrorCallback): void; } | ||
|
||
interface AsyncQueue<T> { | ||
length(): number; | ||
started: boolean; | ||
running(): number; | ||
idle(): boolean; | ||
concurrency: number; | ||
push(task: T, callback?: ErrorCallback): void; | ||
push(task: T[], callback?: ErrorCallback): void; | ||
unshift(task: T, callback?: ErrorCallback): void; | ||
unshift(task: T[], callback?: ErrorCallback): void; | ||
saturated: () => any; | ||
empty: () => any; | ||
drain: () => any; | ||
paused: boolean; | ||
pause(): void | ||
resume(): void; | ||
kill(): void; | ||
} | ||
|
||
interface AsyncPriorityQueue<T> { | ||
length(): number; | ||
concurrency: number; | ||
started: boolean; | ||
paused: boolean; | ||
push(task: T, priority: number, callback?: AsyncResultArrayCallback<T>): void; | ||
push(task: T[], priority: number, callback?: AsyncResultArrayCallback<T>): void; | ||
saturated: () => any; | ||
empty: () => any; | ||
drain: () => any; | ||
running(): number; | ||
idle(): boolean; | ||
pause(): void; | ||
resume(): void; | ||
kill(): void; | ||
} | ||
|
||
interface AsyncCargo { | ||
length(): number; | ||
payload: number; | ||
push(task: any, callback? : Function): void; | ||
push(task: any[], callback? : Function): void; | ||
saturated(): void; | ||
empty(): void; | ||
drain(): void; | ||
idle(): boolean; | ||
pause(): void; | ||
resume(): void; | ||
kill(): void; | ||
} | ||
|
||
interface Async { | ||
|
||
// Collections | ||
each<T>(arr: T[], iterator: AsyncIterator<T>, callback?: ErrorCallback): void; | ||
eachSeries<T>(arr: T[], iterator: AsyncIterator<T>, callback?: ErrorCallback): void; | ||
eachLimit<T>(arr: T[], limit: number, iterator: AsyncIterator<T>, callback?: ErrorCallback): void; | ||
forEachOf(obj: any, iterator: (item: any, key: string|number, callback?: ErrorCallback) => void, callback: ErrorCallback): void; | ||
forEachOf<T>(obj: T[], iterator: AsyncForEachOfIterator<T>, callback?: ErrorCallback): void; | ||
forEachOfSeries(obj: any, iterator: (item: any, key: string|number, callback?: ErrorCallback) => void, callback: ErrorCallback): void; | ||
forEachOfSeries<T>(obj: T[], iterator: AsyncForEachOfIterator<T>, callback?: ErrorCallback): void; | ||
forEachOfLimit(obj: any, limit: number, iterator: (item: any, key: string|number, callback?: ErrorCallback) => void, callback: ErrorCallback): void; | ||
forEachOfLimit<T>(obj: T[], limit: number, iterator: AsyncForEachOfIterator<T>, callback?: ErrorCallback): void; | ||
map<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback?: AsyncResultArrayCallback<R>): any; | ||
mapSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback?: AsyncResultArrayCallback<R>): any; | ||
mapLimit<T, R>(arr: T[], limit: number, iterator: AsyncResultIterator<T, R>, callback?: AsyncResultArrayCallback<R>): any; | ||
filter<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any; | ||
select<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any; | ||
filterSeries<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any; | ||
selectSeries<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any; | ||
filterLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any; | ||
selectLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any; | ||
reject<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any; | ||
rejectSeries<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any; | ||
rejectLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any; | ||
reduce<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback?: AsyncResultCallback<R>): any; | ||
inject<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback?: AsyncResultCallback<R>): any; | ||
foldl<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback?: AsyncResultCallback<R>): any; | ||
reduceRight<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback: AsyncResultCallback<R>): any; | ||
foldr<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback: AsyncResultCallback<R>): any; | ||
detect<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: T) => void): any; | ||
detectSeries<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: T) => void): any; | ||
detectLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (result: T) => void): any; | ||
sortBy<T, V>(arr: T[], iterator: AsyncResultIterator<T, V>, callback?: AsyncResultArrayCallback<T>): any; | ||
some<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => void): any; | ||
someLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => void): any; | ||
any<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => void): any; | ||
every<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => any): any; | ||
everyLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => any): any; | ||
all<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => any): any; | ||
concat<T, R>(arr: T[], iterator: AsyncResultIterator<T, R[]>, callback?: AsyncResultArrayCallback<R>): any; | ||
concatSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R[]>, callback?: AsyncResultArrayCallback<R>): any; | ||
|
||
// Control Flow | ||
series<T>(tasks: AsyncFunction<T>[], callback?: AsyncResultArrayCallback<T>): void; | ||
series<T>(tasks: Dictionary<AsyncFunction<T>>, callback?: AsyncResultObjectCallback<T>): void; | ||
parallel<T>(tasks: Array<AsyncFunction<T>>, callback?: AsyncResultArrayCallback<T>): void; | ||
parallel<T>(tasks: Dictionary<AsyncFunction<T>>, callback?: AsyncResultObjectCallback<T>): void; | ||
parallelLimit<T>(tasks: Array<AsyncFunction<T>>, limit: number, callback?: AsyncResultArrayCallback<T>): void; | ||
parallelLimit<T>(tasks: Dictionary<AsyncFunction<T>>, limit: number, callback?: AsyncResultObjectCallback<T>): void; | ||
whilst(test: () => boolean, fn: AsyncVoidFunction, callback: (err: any) => void): void; | ||
doWhilst(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void; | ||
until(test: () => boolean, fn: AsyncVoidFunction, callback: (err: any) => void): void; | ||
doUntil(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void; | ||
during(test: (testCallback : (error: Error, truth: boolean) => void) => void, fn: AsyncVoidFunction, callback: (err: any) => void): void; | ||
doDuring(fn: AsyncVoidFunction, test: (testCallback: (error: Error, truth: boolean) => void) => void, callback: (err: any) => void): void; | ||
forever(next: (errCallback : (err: Error) => void) => void, errBack: (err: Error) => void) : void; | ||
waterfall(tasks: Function[], callback?: (err: Error, results?: any) => void): void; | ||
compose(...fns: Function[]): Function; | ||
seq(...fns: Function[]): Function; | ||
applyEach(fns: Function[], argsAndCallback: any[]): void; // applyEach(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. | ||
applyEachSeries(fns: Function[], argsAndCallback: any[]): void; // applyEachSeries(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. | ||
queue<T>(worker: AsyncWorker<T>, concurrency?: number): AsyncQueue<T>; | ||
priorityQueue<T>(worker: AsyncWorker<T>, concurrency: number): AsyncPriorityQueue<T>; | ||
cargo(worker : (tasks: any[], callback : ErrorCallback) => void, payload? : number) : AsyncCargo; | ||
auto(tasks: any, callback?: (error: Error, results: any) => void): void; | ||
retry<T>(opts: number, task: (callback : AsyncResultCallback<T>, results: any) => void, callback: (error: Error, results: any) => void): void; | ||
retry<T>(opts: { times: number, interval: number }, task: (callback: AsyncResultCallback<T>, results : any) => void, callback: (error: Error, results: any) => void): void; | ||
iterator(tasks: Function[]): Function; | ||
apply(fn: Function, ...arguments: any[]): AsyncFunction<any>; | ||
nextTick(callback: Function): void; | ||
setImmediate(callback: Function): void; | ||
|
||
times<T> (n: number, iterator: AsyncResultIterator<number, T>, callback: AsyncResultArrayCallback<T>): void; | ||
timesSeries<T>(n: number, iterator: AsyncResultIterator<number, T>, callback: AsyncResultArrayCallback<T>): void; | ||
timesLimit<T>(n: number, limit: number, iterator: AsyncResultIterator<number, T>, callback: AsyncResultArrayCallback<T>): void; | ||
|
||
// Utils | ||
memoize(fn: Function, hasher?: Function): Function; | ||
unmemoize(fn: Function): Function; | ||
ensureAsync(fn: (... argsAndCallback: any[]) => void): Function; | ||
constant(...values: any[]): Function; | ||
asyncify(fn: Function): Function; | ||
wrapSync(fn: Function): Function; | ||
log(fn: Function, ...arguments: any[]): void; | ||
dir(fn: Function, ...arguments: any[]): void; | ||
noConflict(): Async; | ||
} | ||
|
||
declare var async: Async; | ||
|
||
declare module "async" { | ||
export = async; | ||
} |
Oops, something went wrong.