aboutsummaryrefslogtreecommitdiff
path: root/node_modules/jest-jasmine2/build/PCancelable.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/jest-jasmine2/build/PCancelable.d.ts')
-rw-r--r--node_modules/jest-jasmine2/build/PCancelable.d.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/jest-jasmine2/build/PCancelable.d.ts b/node_modules/jest-jasmine2/build/PCancelable.d.ts
new file mode 100644
index 0000000..9645c15
--- /dev/null
+++ b/node_modules/jest-jasmine2/build/PCancelable.d.ts
@@ -0,0 +1,17 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+export default class PCancelable<T> implements PromiseLike<T> {
+ private _pending;
+ private _canceled;
+ private _promise;
+ private _cancel?;
+ private _reject;
+ constructor(executor: (onCancel: (cancelHandler: () => void) => void, resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: unknown) => void) => void);
+ then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onRejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
+ catch<TResult>(onRejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
+ cancel(): void;
+}