forked from trent_larson/crowd-funder-for-time-pwa
Compare commits
3 Commits
starred-pr
...
yml-fixes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b141b6334 | ||
|
|
0f46b8379c | ||
|
|
1bd22ad260 |
12
package-lock.json
generated
12
package-lock.json
generated
@@ -35,6 +35,7 @@
|
|||||||
"ethr-did-resolver": "^8.1.2",
|
"ethr-did-resolver": "^8.1.2",
|
||||||
"jdenticon": "^3.2.0",
|
"jdenticon": "^3.2.0",
|
||||||
"js-generate-password": "^0.1.9",
|
"js-generate-password": "^0.1.9",
|
||||||
|
"js-yaml": "^4.1.0",
|
||||||
"localstorage-slim": "^2.5.0",
|
"localstorage-slim": "^2.5.0",
|
||||||
"luxon": "^3.4.3",
|
"luxon": "^3.4.3",
|
||||||
"merkletreejs": "^0.3.10",
|
"merkletreejs": "^0.3.10",
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
"web-did-resolver": "^2.0.27"
|
"web-did-resolver": "^2.0.27"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/leaflet": "^1.9.4",
|
"@types/leaflet": "^1.9.4",
|
||||||
"@types/ramda": "^0.29.3",
|
"@types/ramda": "^0.29.3",
|
||||||
"@types/three": "^0.155.1",
|
"@types/three": "^0.155.1",
|
||||||
@@ -8792,6 +8794,12 @@
|
|||||||
"@types/istanbul-lib-report": "*"
|
"@types/istanbul-lib-report": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/js-yaml": {
|
||||||
|
"version": "4.0.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz",
|
||||||
|
"integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/@types/json-schema": {
|
"node_modules/@types/json-schema": {
|
||||||
"version": "7.0.13",
|
"version": "7.0.13",
|
||||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz",
|
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz",
|
||||||
@@ -11061,8 +11069,7 @@
|
|||||||
"node_modules/argparse": {
|
"node_modules/argparse": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
|
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||||
"devOptional": true
|
|
||||||
},
|
},
|
||||||
"node_modules/array-buffer-byte-length": {
|
"node_modules/array-buffer-byte-length": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
@@ -18586,7 +18593,6 @@
|
|||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
|
||||||
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
|
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
|
||||||
"devOptional": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"argparse": "^2.0.1"
|
"argparse": "^2.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
"ethr-did-resolver": "^8.1.2",
|
"ethr-did-resolver": "^8.1.2",
|
||||||
"jdenticon": "^3.2.0",
|
"jdenticon": "^3.2.0",
|
||||||
"js-generate-password": "^0.1.9",
|
"js-generate-password": "^0.1.9",
|
||||||
|
"js-yaml": "^4.1.0",
|
||||||
"localstorage-slim": "^2.5.0",
|
"localstorage-slim": "^2.5.0",
|
||||||
"luxon": "^3.4.3",
|
"luxon": "^3.4.3",
|
||||||
"merkletreejs": "^0.3.10",
|
"merkletreejs": "^0.3.10",
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
"web-did-resolver": "^2.0.27"
|
"web-did-resolver": "^2.0.27"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/leaflet": "^1.9.4",
|
"@types/leaflet": "^1.9.4",
|
||||||
"@types/ramda": "^0.29.3",
|
"@types/ramda": "^0.29.3",
|
||||||
"@types/three": "^0.155.1",
|
"@types/three": "^0.155.1",
|
||||||
|
|||||||
350
src/util.d.ts
vendored
350
src/util.d.ts
vendored
@@ -105,7 +105,10 @@ declare module "util" {
|
|||||||
| "date"
|
| "date"
|
||||||
| "regexp"
|
| "regexp"
|
||||||
| "module";
|
| "module";
|
||||||
export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => any; // TODO: , inspect: inspect
|
export type CustomInspectFunction = (
|
||||||
|
depth: number,
|
||||||
|
options: InspectOptionsStylized,
|
||||||
|
) => unknown; // TODO: , inspect: inspect
|
||||||
export interface InspectOptionsStylized extends InspectOptions {
|
export interface InspectOptionsStylized extends InspectOptions {
|
||||||
stylize(text: string, styleType: Style): string;
|
stylize(text: string, styleType: Style): string;
|
||||||
}
|
}
|
||||||
@@ -154,7 +157,10 @@ declare module "util" {
|
|||||||
* @since v0.5.3
|
* @since v0.5.3
|
||||||
* @param format A `printf`-like format string.
|
* @param format A `printf`-like format string.
|
||||||
*/
|
*/
|
||||||
export function format(format?: any, ...param: any[]): string;
|
export function format(
|
||||||
|
format?: string,
|
||||||
|
...param: (string | number | boolean)[]
|
||||||
|
): string;
|
||||||
/**
|
/**
|
||||||
* This function is identical to {@link format}, except in that it takes
|
* This function is identical to {@link format}, except in that it takes
|
||||||
* an `inspectOptions` argument which specifies options that are passed along to {@link inspect}.
|
* an `inspectOptions` argument which specifies options that are passed along to {@link inspect}.
|
||||||
@@ -166,7 +172,11 @@ declare module "util" {
|
|||||||
* ```
|
* ```
|
||||||
* @since v10.0.0
|
* @since v10.0.0
|
||||||
*/
|
*/
|
||||||
export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
|
export function formatWithOptions<T extends unknown[]>(
|
||||||
|
inspectOptions: InspectOptions,
|
||||||
|
format?: string,
|
||||||
|
...param: T
|
||||||
|
): string;
|
||||||
/**
|
/**
|
||||||
* Returns the string name for a numeric error code that comes from a Node.js API.
|
* Returns the string name for a numeric error code that comes from a Node.js API.
|
||||||
* The mapping between error codes and error names is platform-dependent.
|
* The mapping between error codes and error names is platform-dependent.
|
||||||
@@ -261,7 +271,10 @@ declare module "util" {
|
|||||||
* @experimental
|
* @experimental
|
||||||
* @param resource Any non-null entity, reference to which is held weakly.
|
* @param resource Any non-null entity, reference to which is held weakly.
|
||||||
*/
|
*/
|
||||||
export function aborted(signal: AbortSignal, resource: any): Promise<void>;
|
export function aborted(
|
||||||
|
signal: AbortSignal,
|
||||||
|
resource: unknown,
|
||||||
|
): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* The `util.inspect()` method returns a string representation of `object` that is
|
* The `util.inspect()` method returns a string representation of `object` that is
|
||||||
* intended for debugging. The output of `util.inspect` may change at any time
|
* intended for debugging. The output of `util.inspect` may change at any time
|
||||||
@@ -437,8 +450,13 @@ declare module "util" {
|
|||||||
* @param object Any JavaScript primitive or `Object`.
|
* @param object Any JavaScript primitive or `Object`.
|
||||||
* @return The representation of `object`.
|
* @return The representation of `object`.
|
||||||
*/
|
*/
|
||||||
export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
export function inspect(
|
||||||
export function inspect(object: any, options?: InspectOptions): string;
|
object: unknown,
|
||||||
|
showHidden?: boolean,
|
||||||
|
depth?: number | null,
|
||||||
|
color?: boolean,
|
||||||
|
): string;
|
||||||
|
export function inspect(object: unknown, options?: InspectOptions): string;
|
||||||
export namespace inspect {
|
export namespace inspect {
|
||||||
let colors: NodeJS.Dict<[number, number]>;
|
let colors: NodeJS.Dict<[number, number]>;
|
||||||
let styles: {
|
let styles: {
|
||||||
@@ -595,7 +613,10 @@ declare module "util" {
|
|||||||
* @since v0.3.0
|
* @since v0.3.0
|
||||||
* @legacy Use ES2015 class syntax and `extends` keyword instead.
|
* @legacy Use ES2015 class syntax and `extends` keyword instead.
|
||||||
*/
|
*/
|
||||||
export function inherits(constructor: unknown, superConstructor: unknown): void;
|
export function inherits(
|
||||||
|
constructor: unknown,
|
||||||
|
superConstructor: unknown,
|
||||||
|
): void;
|
||||||
export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
|
export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
|
||||||
export interface DebugLogger extends DebugLoggerFunction {
|
export interface DebugLogger extends DebugLoggerFunction {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
@@ -657,7 +678,10 @@ declare module "util" {
|
|||||||
* @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.
|
* @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.
|
||||||
* @return The logging function
|
* @return The logging function
|
||||||
*/
|
*/
|
||||||
export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
|
export function debuglog(
|
||||||
|
section: string,
|
||||||
|
callback?: (fn: DebugLoggerFunction) => void,
|
||||||
|
): DebugLogger;
|
||||||
export const debug: typeof debuglog;
|
export const debug: typeof debuglog;
|
||||||
/**
|
/**
|
||||||
* Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`.
|
* Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`.
|
||||||
@@ -747,7 +771,9 @@ declare module "util" {
|
|||||||
* @since v0.11.5
|
* @since v0.11.5
|
||||||
* @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead.
|
* @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead.
|
||||||
*/
|
*/
|
||||||
export function isNullOrUndefined(object: unknown): object is null | undefined;
|
export function isNullOrUndefined(
|
||||||
|
object: unknown,
|
||||||
|
): object is null | undefined;
|
||||||
/**
|
/**
|
||||||
* Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`.
|
* Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`.
|
||||||
*
|
*
|
||||||
@@ -918,7 +944,11 @@ declare module "util" {
|
|||||||
* @param code A deprecation code. See the `list of deprecated APIs` for a list of codes.
|
* @param code A deprecation code. See the `list of deprecated APIs` for a list of codes.
|
||||||
* @return The deprecated function wrapped to emit a warning.
|
* @return The deprecated function wrapped to emit a warning.
|
||||||
*/
|
*/
|
||||||
export function deprecate<T extends Function>(fn: T, msg: string, code?: string): T;
|
export function deprecate<T extends (...args: unknown[]) => unknown>(
|
||||||
|
fn: T,
|
||||||
|
msg: string,
|
||||||
|
code?: string,
|
||||||
|
): T;
|
||||||
/**
|
/**
|
||||||
* Returns `true` if there is deep strict equality between `val1` and `val2`.
|
* Returns `true` if there is deep strict equality between `val1` and `val2`.
|
||||||
* Otherwise, returns `false`.
|
* Otherwise, returns `false`.
|
||||||
@@ -987,7 +1017,9 @@ declare module "util" {
|
|||||||
* @param fn An `async` function
|
* @param fn An `async` function
|
||||||
* @return a callback style function
|
* @return a callback style function
|
||||||
*/
|
*/
|
||||||
export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
|
export function callbackify(
|
||||||
|
fn: () => Promise<void>,
|
||||||
|
): (callback: (err: NodeJS.ErrnoException) => void) => void;
|
||||||
export function callbackify<TResult>(
|
export function callbackify<TResult>(
|
||||||
fn: () => Promise<TResult>,
|
fn: () => Promise<TResult>,
|
||||||
): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
||||||
@@ -996,22 +1028,49 @@ declare module "util" {
|
|||||||
): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
|
): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
|
||||||
export function callbackify<T1, TResult>(
|
export function callbackify<T1, TResult>(
|
||||||
fn: (arg1: T1) => Promise<TResult>,
|
fn: (arg1: T1) => Promise<TResult>,
|
||||||
): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
): (
|
||||||
|
arg1: T1,
|
||||||
|
callback: (err: NodeJS.ErrnoException, result: TResult) => void,
|
||||||
|
) => void;
|
||||||
export function callbackify<T1, T2>(
|
export function callbackify<T1, T2>(
|
||||||
fn: (arg1: T1, arg2: T2) => Promise<void>,
|
fn: (arg1: T1, arg2: T2) => Promise<void>,
|
||||||
): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
|
): (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
callback: (err: NodeJS.ErrnoException) => void,
|
||||||
|
) => void;
|
||||||
export function callbackify<T1, T2, TResult>(
|
export function callbackify<T1, T2, TResult>(
|
||||||
fn: (arg1: T1, arg2: T2) => Promise<TResult>,
|
fn: (arg1: T1, arg2: T2) => Promise<TResult>,
|
||||||
): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
): (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
||||||
|
) => void;
|
||||||
export function callbackify<T1, T2, T3>(
|
export function callbackify<T1, T2, T3>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>,
|
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>,
|
||||||
): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
|
): (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
callback: (err: NodeJS.ErrnoException) => void,
|
||||||
|
) => void;
|
||||||
export function callbackify<T1, T2, T3, TResult>(
|
export function callbackify<T1, T2, T3, TResult>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>,
|
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>,
|
||||||
): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
): (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
||||||
|
) => void;
|
||||||
export function callbackify<T1, T2, T3, T4>(
|
export function callbackify<T1, T2, T3, T4>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>,
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>,
|
||||||
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
|
): (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
arg4: T4,
|
||||||
|
callback: (err: NodeJS.ErrnoException) => void,
|
||||||
|
) => void;
|
||||||
export function callbackify<T1, T2, T3, T4, TResult>(
|
export function callbackify<T1, T2, T3, T4, TResult>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>,
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>,
|
||||||
): (
|
): (
|
||||||
@@ -1023,7 +1082,14 @@ declare module "util" {
|
|||||||
) => void;
|
) => void;
|
||||||
export function callbackify<T1, T2, T3, T4, T5>(
|
export function callbackify<T1, T2, T3, T4, T5>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>,
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>,
|
||||||
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
|
): (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
arg4: T4,
|
||||||
|
arg5: T5,
|
||||||
|
callback: (err: NodeJS.ErrnoException) => void,
|
||||||
|
) => void;
|
||||||
export function callbackify<T1, T2, T3, T4, T5, TResult>(
|
export function callbackify<T1, T2, T3, T4, T5, TResult>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
|
||||||
): (
|
): (
|
||||||
@@ -1035,7 +1101,14 @@ declare module "util" {
|
|||||||
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
||||||
) => void;
|
) => void;
|
||||||
export function callbackify<T1, T2, T3, T4, T5, T6>(
|
export function callbackify<T1, T2, T3, T4, T5, T6>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
|
fn: (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
arg4: T4,
|
||||||
|
arg5: T5,
|
||||||
|
arg6: T6,
|
||||||
|
) => Promise<void>,
|
||||||
): (
|
): (
|
||||||
arg1: T1,
|
arg1: T1,
|
||||||
arg2: T2,
|
arg2: T2,
|
||||||
@@ -1046,7 +1119,14 @@ declare module "util" {
|
|||||||
callback: (err: NodeJS.ErrnoException) => void,
|
callback: (err: NodeJS.ErrnoException) => void,
|
||||||
) => void;
|
) => void;
|
||||||
export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
|
export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>,
|
fn: (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
arg4: T4,
|
||||||
|
arg5: T5,
|
||||||
|
arg6: T6,
|
||||||
|
) => Promise<TResult>,
|
||||||
): (
|
): (
|
||||||
arg1: T1,
|
arg1: T1,
|
||||||
arg2: T2,
|
arg2: T2,
|
||||||
@@ -1056,15 +1136,21 @@ declare module "util" {
|
|||||||
arg6: T6,
|
arg6: T6,
|
||||||
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
||||||
) => void;
|
) => void;
|
||||||
export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
|
export interface CustomPromisifyLegacy<
|
||||||
|
TCustom extends (...args: unknown[]) => unknown,
|
||||||
|
> {
|
||||||
|
(...args: unknown[]): unknown;
|
||||||
__promisify__: TCustom;
|
__promisify__: TCustom;
|
||||||
}
|
}
|
||||||
export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
|
export interface CustomPromisifySymbol<
|
||||||
|
TCustom extends (...args: unknown[]) => unknown,
|
||||||
|
> {
|
||||||
|
(...args: unknown[]): unknown;
|
||||||
[promisify.custom]: TCustom;
|
[promisify.custom]: TCustom;
|
||||||
}
|
}
|
||||||
export type CustomPromisify<TCustom extends Function> =
|
export type CustomPromisify<TCustom extends (...args: unknown[]) => unknown> =
|
||||||
| CustomPromisifySymbol<TCustom>
|
CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
|
||||||
| CustomPromisifyLegacy<TCustom>;
|
|
||||||
/**
|
/**
|
||||||
* Takes a function following the common error-first callback style, i.e. taking
|
* Takes a function following the common error-first callback style, i.e. taking
|
||||||
* an `(err, value) => ...` callback as the last argument, and returns a version
|
* an `(err, value) => ...` callback as the last argument, and returns a version
|
||||||
@@ -1134,40 +1220,88 @@ declare module "util" {
|
|||||||
* ```
|
* ```
|
||||||
* @since v8.0.0
|
* @since v8.0.0
|
||||||
*/
|
*/
|
||||||
export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
|
export function promisify<TCustom extends (...args: unknown[]) => unknown>(
|
||||||
|
fn: CustomPromisify<TCustom>,
|
||||||
|
): TCustom;
|
||||||
export function promisify<TResult>(
|
export function promisify<TResult>(
|
||||||
fn: (callback: (err: any, result: TResult) => void) => void,
|
fn: (callback: (err: unknown, result: TResult) => void) => void,
|
||||||
): () => Promise<TResult>;
|
): () => Promise<TResult>;
|
||||||
export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
|
export function promisify(
|
||||||
|
fn: (callback: (err?: unknown) => void) => void,
|
||||||
|
): () => Promise<void>;
|
||||||
export function promisify<T1, TResult>(
|
export function promisify<T1, TResult>(
|
||||||
fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void,
|
fn: (arg1: T1, callback: (err: unknown, result: TResult) => void) => void,
|
||||||
): (arg1: T1) => Promise<TResult>;
|
): (arg1: T1) => Promise<TResult>;
|
||||||
export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
|
export function promisify<T1>(
|
||||||
|
fn: (arg1: T1, callback: (err?: unknown) => void) => void,
|
||||||
|
): (arg1: T1) => Promise<void>;
|
||||||
export function promisify<T1, T2, TResult>(
|
export function promisify<T1, T2, TResult>(
|
||||||
fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void,
|
fn: (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
callback: (err: unknown, result: TResult) => void,
|
||||||
|
) => void,
|
||||||
): (arg1: T1, arg2: T2) => Promise<TResult>;
|
): (arg1: T1, arg2: T2) => Promise<TResult>;
|
||||||
export function promisify<T1, T2>(
|
export function promisify<T1, T2>(
|
||||||
fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void,
|
fn: (arg1: T1, arg2: T2, callback: (err?: unknown) => void) => void,
|
||||||
): (arg1: T1, arg2: T2) => Promise<void>;
|
): (arg1: T1, arg2: T2) => Promise<void>;
|
||||||
export function promisify<T1, T2, T3, TResult>(
|
export function promisify<T1, T2, T3, TResult>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void,
|
fn: (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
callback: (err: unknown, result: TResult) => void,
|
||||||
|
) => void,
|
||||||
): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
|
): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
|
||||||
export function promisify<T1, T2, T3>(
|
export function promisify<T1, T2, T3>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void,
|
fn: (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
callback: (err?: unknown) => void,
|
||||||
|
) => void,
|
||||||
): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
|
): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
|
||||||
export function promisify<T1, T2, T3, T4, TResult>(
|
export function promisify<T1, T2, T3, T4, TResult>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
|
fn: (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
arg4: T4,
|
||||||
|
callback: (err: unknown, result: TResult) => void,
|
||||||
|
) => void,
|
||||||
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
|
||||||
export function promisify<T1, T2, T3, T4>(
|
export function promisify<T1, T2, T3, T4>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void,
|
fn: (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
arg4: T4,
|
||||||
|
callback: (err?: unknown) => void,
|
||||||
|
) => void,
|
||||||
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
|
||||||
export function promisify<T1, T2, T3, T4, T5, TResult>(
|
export function promisify<T1, T2, T3, T4, T5, TResult>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
|
fn: (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
arg4: T4,
|
||||||
|
arg5: T5,
|
||||||
|
callback: (err: unknown, result: TResult) => void,
|
||||||
|
) => void,
|
||||||
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
|
||||||
export function promisify<T1, T2, T3, T4, T5>(
|
export function promisify<T1, T2, T3, T4, T5>(
|
||||||
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
|
fn: (
|
||||||
|
arg1: T1,
|
||||||
|
arg2: T2,
|
||||||
|
arg3: T3,
|
||||||
|
arg4: T4,
|
||||||
|
arg5: T5,
|
||||||
|
callback: (err?: unknown) => void,
|
||||||
|
) => void,
|
||||||
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
|
||||||
export function promisify(fn: Function): Function;
|
export function promisify<T extends (...args: unknown[]) => void>(
|
||||||
|
fn: T,
|
||||||
|
): (...funcArgs: Parameters<T>) => Promise<void>;
|
||||||
export namespace promisify {
|
export namespace promisify {
|
||||||
/**
|
/**
|
||||||
* That can be used to declare custom promisified variants of functions.
|
* That can be used to declare custom promisified variants of functions.
|
||||||
@@ -1272,27 +1406,32 @@ declare module "util" {
|
|||||||
*/
|
*/
|
||||||
encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
|
encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
|
||||||
}
|
}
|
||||||
import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from "util";
|
import {
|
||||||
|
TextDecoder as _TextDecoder,
|
||||||
|
TextEncoder as _TextEncoder,
|
||||||
|
} from "util";
|
||||||
global {
|
global {
|
||||||
/**
|
/**
|
||||||
* `TextDecoder` class is a global reference for `require('util').TextDecoder`
|
* `TextDecoder` class is a global reference for `require('util').TextDecoder`
|
||||||
* https://nodejs.org/api/globals.html#textdecoder
|
* https://nodejs.org/api/globals.html#textdecoder
|
||||||
* @since v11.0.0
|
* @since v11.0.0
|
||||||
*/
|
*/
|
||||||
var TextDecoder: typeof globalThis extends {
|
let TextDecoder: typeof globalThis extends {
|
||||||
onmessage: any;
|
onmessage: unknown;
|
||||||
TextDecoder: infer TextDecoder;
|
TextDecoder: infer TextDecoder;
|
||||||
} ? TextDecoder
|
}
|
||||||
|
? TextDecoder
|
||||||
: typeof _TextDecoder;
|
: typeof _TextDecoder;
|
||||||
/**
|
/**
|
||||||
* `TextEncoder` class is a global reference for `require('util').TextEncoder`
|
* `TextEncoder` class is a global reference for `require('util').TextEncoder`
|
||||||
* https://nodejs.org/api/globals.html#textencoder
|
* https://nodejs.org/api/globals.html#textencoder
|
||||||
* @since v11.0.0
|
* @since v11.0.0
|
||||||
*/
|
*/
|
||||||
var TextEncoder: typeof globalThis extends {
|
let TextEncoder: typeof globalThis extends {
|
||||||
onmessage: any;
|
onmessage: unknown;
|
||||||
TextEncoder: infer TextEncoder;
|
TextEncoder: infer TextEncoder;
|
||||||
} ? TextEncoder
|
}
|
||||||
|
? TextEncoder
|
||||||
: typeof _TextEncoder;
|
: typeof _TextEncoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1325,7 +1464,9 @@ declare module "util" {
|
|||||||
* @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties:
|
* @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties:
|
||||||
* @return The parsed command line arguments:
|
* @return The parsed command line arguments:
|
||||||
*/
|
*/
|
||||||
export function parseArgs<T extends ParseArgsConfig>(config?: T): ParsedResults<T>;
|
export function parseArgs<T extends ParseArgsConfig>(
|
||||||
|
config?: T,
|
||||||
|
): ParsedResults<T>;
|
||||||
interface ParseArgsOptionConfig {
|
interface ParseArgsOptionConfig {
|
||||||
/**
|
/**
|
||||||
* Type of argument.
|
* Type of argument.
|
||||||
@@ -1388,31 +1529,46 @@ declare module "util" {
|
|||||||
This is technically incorrect but is a much nicer UX for the common case.
|
This is technically incorrect but is a much nicer UX for the common case.
|
||||||
The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
|
The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
|
||||||
*/
|
*/
|
||||||
type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true ? IfTrue
|
type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true
|
||||||
: T extends false ? IfFalse
|
? IfTrue
|
||||||
|
: T extends false
|
||||||
|
? IfFalse
|
||||||
: IfTrue;
|
: IfTrue;
|
||||||
|
|
||||||
// we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
|
// we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
|
||||||
type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false ? IfFalse
|
type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false
|
||||||
: T extends true ? IfTrue
|
? IfFalse
|
||||||
|
: T extends true
|
||||||
|
? IfTrue
|
||||||
: IfFalse;
|
: IfFalse;
|
||||||
|
|
||||||
type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionConfig> = IfDefaultsTrue<
|
type ExtractOptionValue<
|
||||||
|
T extends ParseArgsConfig,
|
||||||
|
O extends ParseArgsOptionConfig,
|
||||||
|
> = IfDefaultsTrue<
|
||||||
T["strict"],
|
T["strict"],
|
||||||
O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean,
|
O["type"] extends "string"
|
||||||
|
? string
|
||||||
|
: O["type"] extends "boolean"
|
||||||
|
? boolean
|
||||||
|
: string | boolean,
|
||||||
string | boolean
|
string | boolean
|
||||||
>;
|
>;
|
||||||
|
|
||||||
type ParsedValues<T extends ParseArgsConfig> =
|
type ParsedValues<T extends ParseArgsConfig> = IfDefaultsTrue<
|
||||||
& IfDefaultsTrue<T["strict"], unknown, { [longOption: string]: undefined | string | boolean }>
|
T["strict"],
|
||||||
& (T["options"] extends ParseArgsOptionsConfig ? {
|
unknown,
|
||||||
|
{ [longOption: string]: undefined | string | boolean }
|
||||||
|
> &
|
||||||
|
(T["options"] extends ParseArgsOptionsConfig
|
||||||
|
? {
|
||||||
-readonly [LongOption in keyof T["options"]]: IfDefaultsFalse<
|
-readonly [LongOption in keyof T["options"]]: IfDefaultsFalse<
|
||||||
T["options"][LongOption]["multiple"],
|
T["options"][LongOption]["multiple"],
|
||||||
undefined | Array<ExtractOptionValue<T, T["options"][LongOption]>>,
|
undefined | Array<ExtractOptionValue<T, T["options"][LongOption]>>,
|
||||||
undefined | ExtractOptionValue<T, T["options"][LongOption]>
|
undefined | ExtractOptionValue<T, T["options"][LongOption]>
|
||||||
>;
|
>;
|
||||||
}
|
}
|
||||||
: {});
|
: object);
|
||||||
|
|
||||||
type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
|
type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
|
||||||
T["strict"],
|
T["strict"],
|
||||||
@@ -1423,7 +1579,8 @@ declare module "util" {
|
|||||||
type PreciseTokenForOptions<
|
type PreciseTokenForOptions<
|
||||||
K extends string,
|
K extends string,
|
||||||
O extends ParseArgsOptionConfig,
|
O extends ParseArgsOptionConfig,
|
||||||
> = O["type"] extends "string" ? {
|
> = O["type"] extends "string"
|
||||||
|
? {
|
||||||
kind: "option";
|
kind: "option";
|
||||||
index: number;
|
index: number;
|
||||||
name: K;
|
name: K;
|
||||||
@@ -1431,7 +1588,8 @@ declare module "util" {
|
|||||||
value: string;
|
value: string;
|
||||||
inlineValue: boolean;
|
inlineValue: boolean;
|
||||||
}
|
}
|
||||||
: O["type"] extends "boolean" ? {
|
: O["type"] extends "boolean"
|
||||||
|
? {
|
||||||
kind: "option";
|
kind: "option";
|
||||||
index: number;
|
index: number;
|
||||||
name: K;
|
name: K;
|
||||||
@@ -1445,20 +1603,35 @@ declare module "util" {
|
|||||||
T extends ParseArgsConfig,
|
T extends ParseArgsConfig,
|
||||||
K extends keyof T["options"] = keyof T["options"],
|
K extends keyof T["options"] = keyof T["options"],
|
||||||
> = K extends unknown
|
> = K extends unknown
|
||||||
? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions<K & string, T["options"][K]>
|
? T["options"] extends ParseArgsOptionsConfig
|
||||||
|
? PreciseTokenForOptions<K & string, T["options"][K]>
|
||||||
: OptionToken
|
: OptionToken
|
||||||
: never;
|
: never;
|
||||||
|
|
||||||
type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T["strict"], TokenForOptions<T>, OptionToken>;
|
type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<
|
||||||
|
T["strict"],
|
||||||
|
TokenForOptions<T>,
|
||||||
|
OptionToken
|
||||||
|
>;
|
||||||
|
|
||||||
type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
|
type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
|
||||||
T["strict"],
|
T["strict"],
|
||||||
IfDefaultsFalse<T["allowPositionals"], { kind: "positional"; index: number; value: string }, never>,
|
IfDefaultsFalse<
|
||||||
IfDefaultsTrue<T["allowPositionals"], { kind: "positional"; index: number; value: string }, never>
|
T["allowPositionals"],
|
||||||
|
{ kind: "positional"; index: number; value: string },
|
||||||
|
never
|
||||||
|
>,
|
||||||
|
IfDefaultsTrue<
|
||||||
|
T["allowPositionals"],
|
||||||
|
{ kind: "positional"; index: number; value: string },
|
||||||
|
never
|
||||||
|
>
|
||||||
>;
|
>;
|
||||||
|
|
||||||
type ParsedTokens<T extends ParseArgsConfig> = Array<
|
type ParsedTokens<T extends ParseArgsConfig> = Array<
|
||||||
ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: "option-terminator"; index: number }
|
| ParsedOptionToken<T>
|
||||||
|
| ParsedPositionalToken<T>
|
||||||
|
| { kind: "option-terminator"; index: number }
|
||||||
>;
|
>;
|
||||||
|
|
||||||
type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
|
type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
|
||||||
@@ -1475,7 +1648,14 @@ declare module "util" {
|
|||||||
>;
|
>;
|
||||||
|
|
||||||
type OptionToken =
|
type OptionToken =
|
||||||
| { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
|
| {
|
||||||
|
kind: "option";
|
||||||
|
index: number;
|
||||||
|
name: string;
|
||||||
|
rawName: string;
|
||||||
|
value: string;
|
||||||
|
inlineValue: boolean;
|
||||||
|
}
|
||||||
| {
|
| {
|
||||||
kind: "option";
|
kind: "option";
|
||||||
index: number;
|
index: number;
|
||||||
@@ -1492,9 +1672,14 @@ declare module "util" {
|
|||||||
|
|
||||||
// If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
|
// If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
|
||||||
// So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
|
// So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
|
||||||
type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T ? {
|
type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T
|
||||||
|
? {
|
||||||
values: {
|
values: {
|
||||||
[longOption: string]: undefined | string | boolean | Array<string | boolean>;
|
[longOption: string]:
|
||||||
|
| undefined
|
||||||
|
| string
|
||||||
|
| boolean
|
||||||
|
| Array<string | boolean>;
|
||||||
};
|
};
|
||||||
positionals: string[];
|
positionals: string[];
|
||||||
tokens?: Token[];
|
tokens?: Token[];
|
||||||
@@ -1754,7 +1939,7 @@ declare module "util/types" {
|
|||||||
* ```
|
* ```
|
||||||
* @since v10.0.0
|
* @since v10.0.0
|
||||||
*/
|
*/
|
||||||
function isBooleanObject(object: unknown): object is Boolean;
|
function isBooleanObject(object: unknown): object is boolean;
|
||||||
/**
|
/**
|
||||||
* Returns `true` if the value is any boxed primitive object, e.g. created
|
* Returns `true` if the value is any boxed primitive object, e.g. created
|
||||||
* by `new Boolean()`, `new String()` or `Object(Symbol())`.
|
* by `new Boolean()`, `new String()` or `Object(Symbol())`.
|
||||||
@@ -1770,7 +1955,9 @@ declare module "util/types" {
|
|||||||
* ```
|
* ```
|
||||||
* @since v10.11.0
|
* @since v10.11.0
|
||||||
*/
|
*/
|
||||||
function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol;
|
function isBoxedPrimitive(
|
||||||
|
object: unknown,
|
||||||
|
): object is string | number | bigint | boolean | symbol;
|
||||||
/**
|
/**
|
||||||
* Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance.
|
* Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance.
|
||||||
*
|
*
|
||||||
@@ -1923,8 +2110,11 @@ declare module "util/types" {
|
|||||||
* @since v10.0.0
|
* @since v10.0.0
|
||||||
*/
|
*/
|
||||||
function isMap<T>(
|
function isMap<T>(
|
||||||
object: T | {},
|
object: T | object,
|
||||||
): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>)
|
): object is T extends ReadonlyMap<unknown, unknown>
|
||||||
|
? unknown extends T
|
||||||
|
? never
|
||||||
|
: ReadonlyMap<unknown, unknown>
|
||||||
: Map<unknown, unknown>;
|
: Map<unknown, unknown>;
|
||||||
/**
|
/**
|
||||||
* Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
|
* Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
|
||||||
@@ -1962,7 +2152,7 @@ declare module "util/types" {
|
|||||||
* Subclasses of the native error types are also native errors:
|
* Subclasses of the native error types are also native errors:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* class MyError extends Error {}
|
* class MyError extends Error object
|
||||||
* console.log(util.types.isNativeError(new MyError())); // true
|
* console.log(util.types.isNativeError(new MyError())); // true
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@@ -1971,7 +2161,7 @@ declare module "util/types" {
|
|||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* const vm = require('node:vm');
|
* const vm = require('node:vm');
|
||||||
* const context = vm.createContext({});
|
* const context = vm.createContext(object);
|
||||||
* const myError = vm.runInContext('new Error()', context);
|
* const myError = vm.runInContext('new Error()', context);
|
||||||
* console.log(util.types.isNativeError(myError)); // true
|
* console.log(util.types.isNativeError(myError)); // true
|
||||||
* console.log(myError instanceof Error); // false
|
* console.log(myError instanceof Error); // false
|
||||||
@@ -1999,7 +2189,7 @@ declare module "util/types" {
|
|||||||
* ```
|
* ```
|
||||||
* @since v10.0.0
|
* @since v10.0.0
|
||||||
*/
|
*/
|
||||||
function isNumberObject(object: unknown): object is Number;
|
function isNumberObject(object: unknown): object is number;
|
||||||
/**
|
/**
|
||||||
* Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
|
* Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
|
||||||
*
|
*
|
||||||
@@ -2040,8 +2230,12 @@ declare module "util/types" {
|
|||||||
* @since v10.0.0
|
* @since v10.0.0
|
||||||
*/
|
*/
|
||||||
function isSet<T>(
|
function isSet<T>(
|
||||||
object: T | {},
|
object: T | object,
|
||||||
): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
|
): object is T extends ReadonlySet<unknown>
|
||||||
|
? unknown extends T
|
||||||
|
? never
|
||||||
|
: ReadonlySet<unknown>
|
||||||
|
: Set<unknown>;
|
||||||
/**
|
/**
|
||||||
* Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
|
* Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
|
||||||
*
|
*
|
||||||
@@ -2077,7 +2271,7 @@ declare module "util/types" {
|
|||||||
* ```
|
* ```
|
||||||
* @since v10.0.0
|
* @since v10.0.0
|
||||||
*/
|
*/
|
||||||
function isStringObject(object: unknown): object is String;
|
function isStringObject(object: unknown): object is string;
|
||||||
/**
|
/**
|
||||||
* Returns `true` if the value is a symbol object, created
|
* Returns `true` if the value is a symbol object, created
|
||||||
* by calling `Object()` on a `Symbol` primitive.
|
* by calling `Object()` on a `Symbol` primitive.
|
||||||
@@ -2089,7 +2283,7 @@ declare module "util/types" {
|
|||||||
* ```
|
* ```
|
||||||
* @since v10.0.0
|
* @since v10.0.0
|
||||||
*/
|
*/
|
||||||
function isSymbolObject(object: unknown): object is Symbol;
|
function isSymbolObject(object: unknown): object is symbol;
|
||||||
/**
|
/**
|
||||||
* Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance.
|
* Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -137,7 +137,7 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2 class="font-bold text-2xl mt-8">Claim</h2>
|
<h2 class="font-bold text-2xl mt-8">Claim</h2>
|
||||||
<pre>{{ util.inspect(veriClaim, false, null) }}</pre>
|
<pre>{{ yamlVeriClaim }}</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 class="font-bold text-2xl mt-8">Full Claim</h2>
|
<h2 class="font-bold text-2xl mt-8">Full Claim</h2>
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<pre>{{ util.inspect(fullClaim, false, null) }}</pre>
|
<pre>{{ yamlFullClaim }}</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a :href="apiServer + '/api/claim/' + veriClaim.id" target="_blank">
|
<a :href="apiServer + '/api/claim/' + veriClaim.id" target="_blank">
|
||||||
@@ -186,6 +186,7 @@ import * as serverUtil from "@/libs/endorserServer";
|
|||||||
import QuickNav from "@/components/QuickNav.vue";
|
import QuickNav from "@/components/QuickNav.vue";
|
||||||
import EntityIcon from "@/components/EntityIcon.vue";
|
import EntityIcon from "@/components/EntityIcon.vue";
|
||||||
import { Account } from "@/db/tables/accounts";
|
import { Account } from "@/db/tables/accounts";
|
||||||
|
import * as yaml from 'js-yaml';
|
||||||
|
|
||||||
interface Notification {
|
interface Notification {
|
||||||
group: string;
|
group: string;
|
||||||
@@ -300,7 +301,8 @@ export default class ClaimView extends Vue {
|
|||||||
try {
|
try {
|
||||||
const resp = await this.axios.get(url, { headers });
|
const resp = await this.axios.get(url, { headers });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
this.veriClaim = resp.data;
|
this.veriClaim = resp.json;
|
||||||
|
this.yamlVeriClaim = yaml.dumps(resp.json);
|
||||||
} else {
|
} else {
|
||||||
// actually, axios typically throws an error so we never get here
|
// actually, axios typically throws an error so we never get here
|
||||||
console.log("Error getting claim:", resp);
|
console.log("Error getting claim:", resp);
|
||||||
@@ -379,7 +381,8 @@ export default class ClaimView extends Vue {
|
|||||||
try {
|
try {
|
||||||
const resp = await this.axios.get(url, { headers });
|
const resp = await this.axios.get(url, { headers });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
this.fullClaim = resp.data;
|
this.fullClaim = resp.json;
|
||||||
|
this.yamlFullClaim = yaml.dump(resp.json);
|
||||||
} else {
|
} else {
|
||||||
// actually, axios typically throws an error so we never get here
|
// actually, axios typically throws an error so we never get here
|
||||||
console.log("Error getting full claim:", resp);
|
console.log("Error getting full claim:", resp);
|
||||||
|
|||||||
Reference in New Issue
Block a user