Skip to content

Commit b97bc69

Browse files
Formatted types/z* packages with dprint
1 parent 824cf72 commit b97bc69

73 files changed

Lines changed: 24102 additions & 23831 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

types/zalgo-promise/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Definitions by: Daniel Shuy <https://github.com/daniel-shuy>
44
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

6-
export { ZalgoPromise } from './promise';
6+
export { ZalgoPromise } from "./promise";
77

88
// UMD
99
export as namespace ZalgoPromise;

types/zalgo-promise/promise.d.ts

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export class ZalgoPromise<R> {
1818
then<X>(onSuccess?: (result: R) => ZalgoPromise<X>, onError?: (error: any) => ZalgoPromise<X>): ZalgoPromise<X>;
1919
then<Y>(onSuccess?: (result: R) => Y, onError?: (error: any) => Y): ZalgoPromise<Y>;
2020
// to support mixed promise/non-promise return types
21-
then<X, Y>(onSuccess: (result: R) => ZalgoPromise<X> | Y, onError: (error: any) => ZalgoPromise<X> | Y): ZalgoPromise<X | Y>;
21+
then<X, Y>(
22+
onSuccess: (result: R) => ZalgoPromise<X> | Y,
23+
onError: (error: any) => ZalgoPromise<X> | Y,
24+
): ZalgoPromise<X | Y>;
2225

2326
catch<X>(onError: (error: any) => ZalgoPromise<X>): ZalgoPromise<X>;
2427
catch<Y>(onError: (error: any) => Y): ZalgoPromise<Y>;
@@ -43,14 +46,26 @@ export class ZalgoPromise<R> {
4346

4447
static hash<O extends {}>(promises: O): ZalgoPromise<FlattenPromises<O>>;
4548

46-
static map<T, X>(items: readonly T[], method: (item: T) => (ZalgoPromise<X> | X)): ZalgoPromise<readonly X[]>;
49+
static map<T, X>(items: readonly T[], method: (item: T) => ZalgoPromise<X> | X): ZalgoPromise<readonly X[]>;
4750

48-
static onPossiblyUnhandledException(handler: (err: any) => void): {cancel: () => void};
51+
static onPossiblyUnhandledException(handler: (err: any) => void): { cancel: () => void };
4952

5053
// to support conditional promising returning method
51-
static try<X, A extends readonly any[]>(method: (...args: A) => ZalgoPromise<X> | undefined, context?: any, args?: Partial<A>): ZalgoPromise<X | undefined>;
52-
static try<X, A extends readonly any[]>(method: (...args: A) => ZalgoPromise<X>, context?: any, args?: Partial<A>): ZalgoPromise<X>;
53-
static try<Y, A extends readonly any[]>(method: (...args: A) => Y, context?: any, args?: Partial<A>): ZalgoPromise<Y>;
54+
static try<X, A extends readonly any[]>(
55+
method: (...args: A) => ZalgoPromise<X> | undefined,
56+
context?: any,
57+
args?: Partial<A>,
58+
): ZalgoPromise<X | undefined>;
59+
static try<X, A extends readonly any[]>(
60+
method: (...args: A) => ZalgoPromise<X>,
61+
context?: any,
62+
args?: Partial<A>,
63+
): ZalgoPromise<X>;
64+
static try<Y, A extends readonly any[]>(
65+
method: (...args: A) => Y,
66+
context?: any,
67+
args?: Partial<A>,
68+
): ZalgoPromise<Y>;
5469

5570
static delay(delay: number): ZalgoPromise<void>;
5671

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ZalgoPromise = require('zalgo-promise');
1+
import ZalgoPromise = require("zalgo-promise");
22

33
// $ExpectType ZalgoPromise<void>
44
ZalgoPromise.ZalgoPromise.resolve();

0 commit comments

Comments
 (0)