@inquirer/type
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -14,3 +14,12 @@ "use strict"; | ||
} | ||
static withResolver() { | ||
let resolve; | ||
let reject; | ||
const promise = new CancelablePromise((res, rej) => { | ||
resolve = res; | ||
reject = rej; | ||
}); | ||
return { promise, resolve: resolve, reject: reject }; | ||
} | ||
} | ||
exports.CancelablePromise = CancelablePromise; |
@@ -5,2 +5,7 @@ import * as readline from 'node:readline'; | ||
cancel: () => void; | ||
static withResolver<T>(): { | ||
promise: CancelablePromise<T>; | ||
resolve: (value: T) => void; | ||
reject: (error: unknown) => void; | ||
}; | ||
} | ||
@@ -16,3 +21,4 @@ export type InquirerReadline = readline.ReadLine & { | ||
clearPromptOnDone?: boolean; | ||
signal?: AbortSignal; | ||
}; | ||
export type Prompt<Value, Config> = (config: Config, context?: Context) => CancelablePromise<Value>; |
{ | ||
"name": "@inquirer/type", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "Inquirer core TS types", | ||
@@ -82,3 +82,3 @@ "main": "./dist/cjs/index.js", | ||
"sideEffects": false, | ||
"gitHead": "056e26aa6497e0036864d032f9eb8d821de821e7" | ||
"gitHead": "0c039599ef88fe9eb804fe083ee386ec906a856f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64439
154