mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* Added typings for this promise-hash library * pull out common type for the promise hash argument * make recommended simplifications, expand test
17 lines
461 B
TypeScript
17 lines
461 B
TypeScript
// Type definitions for promise-hash 1.3
|
|
// Project: https://github.com/mtimofiiv/promise-hash
|
|
// Definitions by: Michael Shafir <https://github.com/mshafir>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export = hash;
|
|
|
|
type PromiseHash = <T>(promiseHash: { [P in keyof T]: PromiseLike<T[P]> | T[P] }) => Promise<T>;
|
|
|
|
declare global {
|
|
interface PromiseConstructor {
|
|
hash: PromiseHash;
|
|
}
|
|
}
|
|
|
|
declare const hash: PromiseHash;
|