From 576d326d0d69f5c2f19b913cd3138864031af3a2 Mon Sep 17 00:00:00 2001 From: Joseph Werle Date: Mon, 26 Aug 2024 16:05:07 +0200 Subject: [PATCH] chore(api): generate types + docs --- api/README.md | 14 ++--- api/index.d.ts | 139 ++++++++++++++++++++++++------------------------- 2 files changed, 76 insertions(+), 77 deletions(-) diff --git a/api/README.md b/api/README.md index fa4527b133..97c421e502 100644 --- a/api/README.md +++ b/api/README.md @@ -1736,7 +1736,7 @@ This is a `FunctionDeclaration` named `maybeMakeError` in `api/ipc.js`, it's exp This is a `ClassDeclaration` named ``IPCSearchParams` (extends `URLSearchParams`)` in `api/ipc.js`, it's exported but undocumented. -## [`emit(name, value, target, options)`](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1219) +## [`emit(name, value, target, options)`](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1218) Emit event to be dispatched on `window` object. @@ -1747,7 +1747,7 @@ Emit event to be dispatched on `window` object. | target | EventTarget | window | true | | | options | Object | | true | | -## [`send(command, value, options)`](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1278) +## [`send(command, value, options)`](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1277) Sends an async IPC command request with parameters. @@ -1763,27 +1763,27 @@ Sends an async IPC command request with parameters. | :--- | :--- | :--- | | Not specified | Promise | | -## [`inflateIPCMessageTransfers()`](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1729) +## [`inflateIPCMessageTransfers()`](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1728) This is a `FunctionDeclaration` named `inflateIPCMessageTransfers` in `api/ipc.js`, it's exported but undocumented. -## [`findIPCMessageTransfers()`](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1761) +## [`findIPCMessageTransfers()`](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1760) This is a `FunctionDeclaration` named `findIPCMessageTransfers` in `api/ipc.js`, it's exported but undocumented. -## [ports](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1826) +## [ports](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1825) This is a `VariableDeclaration` named `ports` in `api/ipc.js`, it's exported but undocumented. -## [`IPCMessagePort` (extends `MessagePort`)](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1828) +## [`IPCMessagePort` (extends `MessagePort`)](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L1827) This is a `ClassDeclaration` named ``IPCMessagePort` (extends `MessagePort`)` in `api/ipc.js`, it's exported but undocumented. -## [`IPCMessageChannel` (extends `MessageChannel`)](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L2054) +## [`IPCMessageChannel` (extends `MessageChannel`)](https://github.com/socketsupply/socket/blob/v0.6.0-next/api/ipc.js#L2053) This is a `ClassDeclaration` named ``IPCMessageChannel` (extends `MessageChannel`)` in `api/ipc.js`, it's exported but undocumented. diff --git a/api/index.d.ts b/api/index.d.ts index 3fb9ce277f..ad8a04b0d0 100644 --- a/api/index.d.ts +++ b/api/index.d.ts @@ -127,7 +127,7 @@ declare module "socket:async/context" { * @param {Variable} key * @return {boolean} */ - get(key: Variable): boolean; + get(key: Variable): boolean; /** * Sets an `AsyncContext.Variable` value at `key`. If the `Mapping` is frozen, * then a "forked" (new) instance with the value set on it is returned, @@ -137,7 +137,7 @@ declare module "socket:async/context" { * @param {T} value * @return {Mapping} */ - set(key: Variable, value: T): Mapping; + set(key: Variable, value: T_2): Mapping; /** * Delete an `AsyncContext.Variable` value at `key`. * If the `Mapping` is frozen, then a "forked" (new) instance is returned, @@ -147,7 +147,7 @@ declare module "socket:async/context" { * @param {T} value * @return {Mapping} */ - delete(key: Variable): Mapping; + delete(key: Variable): Mapping; #private; } /** @@ -177,7 +177,7 @@ declare module "socket:async/context" { * @param {Variable} key * @return {T|undefined} */ - static get(key: Variable): T | undefined; + static get(key: Variable): T_1; /** * Set updates the `AsyncContext.Variable` with a new value and returns a * revert action that allows the modification to be reversed in the future. @@ -186,7 +186,7 @@ declare module "socket:async/context" { * @param {T} value * @return {Revert|FrozenRevert} */ - static set(key: Variable, value: T): Revert | FrozenRevert; + static set(key: Variable, value: T_2): FrozenRevert | Revert; /** * "Freezes" the current storage `Mapping`, and returns a new `FrozenRevert` * or `Revert` which can restore the storage state to the state at @@ -200,7 +200,7 @@ declare module "socket:async/context" { * @template T * @param {Revert|FrozenRevert} revert */ - static restore(revert: Revert | FrozenRevert): void; + static restore(revert: FrozenRevert | Revert): void; /** * Switches storage `Mapping` state to the state at the time of a * "snapshot". @@ -254,7 +254,7 @@ declare module "socket:async/context" { * @template T * @return {T|undefined} */ - get(): T_1 | undefined; + get(): T_2; #private; } /** @@ -282,7 +282,7 @@ declare module "socket:async/context" { * @param {F} fn * @returns {F} */ - static wrap(fn: F): F; + static wrap(fn: F_1): F_1; /** * Runs the given function `fn` with arguments `args`, using a `null` * context and the current snapshot. @@ -340,7 +340,7 @@ declare module "socket:events" { }; export const CustomEvent: { new (type: string, eventInitDict?: CustomEventInit): CustomEvent; - prototype: CustomEvent; + prototype: CustomEvent; } | { new (type: any, options: any): { "__#7@#detail": any; @@ -349,7 +349,7 @@ declare module "socket:events" { }; export const MessageEvent: { new (type: string, eventInitDict?: MessageEventInit): MessageEvent; - prototype: MessageEvent; + prototype: MessageEvent; } | { new (type: any, options: any): { "__#8@#detail": any; @@ -1422,7 +1422,7 @@ declare module "socket:errors" { * `ErrnoError` class constructor. * @param {import('./errno').errno|string} code */ - constructor(code: import("socket:errno").errno | string, message?: any, ...args: any[]); + constructor(code: import('./errno').errno | string, message?: any, ...args: any[]); get name(): string; get code(): number; #private; @@ -2189,7 +2189,7 @@ declare module "socket:util" { export function isTypedArray(object: any): boolean; export function isArrayLike(input: any): boolean; export function isError(object: any): boolean; - export function isSymbol(value: any): value is symbol; + export function isSymbol(value: any): boolean; export function isNumber(value: any): boolean; export function isBoolean(value: any): boolean; export function isArrayBufferView(buf: any): boolean; @@ -2865,7 +2865,7 @@ declare module "socket:internal/events" { * @param {object=} [data] * @param {import('../application/menu.js').Menu} menu */ - constructor(type?: string | undefined, data?: object | undefined, menu?: import("socket:application/menu").Menu); + constructor(type?: string | undefined, data?: object | undefined, menu?: import('../application/menu.js').Menu); /** * The `Menu` this event has been dispatched for. * @type {import('../application/menu.js').Menu?} @@ -3106,7 +3106,7 @@ declare module "socket:os" { * @ignore * @return {'android'|'android-emulator'|'iphoneos'|iphone-simulator'|'linux'|'macosx'|unix'|unknown'|win32'} */ - export function host(): "android" | "android-emulator" | "iphoneos" | iphone; + export function host(): 'android' | 'android-emulator' | 'iphoneos' | iphone; /** * Returns the home directory of the current user. * @return {string} @@ -3136,7 +3136,7 @@ declare module "socket:process/signal" { * @param {string|number} name * @return {signal} */ - export function getCode(name: string | number): signal; + export function getCode(name: string | number): any; /** * Gets the name for a given 'signal' code * @return {string} @@ -3280,7 +3280,7 @@ declare module "socket:internal/streams/web" { constructor(e?: {}, t?: {}); get locked(): boolean; cancel(e?: any): any; - getReader(e?: any): ReadableStreamBYOBReader | ReadableStreamDefaultReader; + getReader(e?: any): ReadableStreamDefaultReader | ReadableStreamBYOBReader; pipeThrough(e: any, t?: {}): any; pipeTo(e: any, t?: {}): any; tee(): any; @@ -3661,7 +3661,7 @@ declare module "socket:process" { export class ProcessEnvironment extends EventTarget { get [Symbol.toStringTag](): string; } - export const env: ProcessEnvironment; + export const env: any; export default process; const process: any; } @@ -4553,9 +4553,9 @@ declare module "socket:diagnostics/window" { patched: { open: { (method: string, url: string | URL): void; - (method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + (method: string, url: string | URL, async: boolean, username?: string, password?: string): void; }; - send: (body?: Document | XMLHttpRequestBodyInit | null) => void; + send: (body?: Document | XMLHttpRequestBodyInit) => void; }; } export class WorkerMetric extends Metric { @@ -5283,7 +5283,7 @@ declare module "socket:fs/stats" { * @param {fromBigInt=} [fromBigInt = false] * @return {Stats} */ - static from(stat?: object | Stats, fromBigInt?: any | undefined): Stats; + static from(stat?: object | Stats, fromBigInt?: any): Stats; /** * `Stats` class constructor. * @param {object|Stats} stat @@ -6156,7 +6156,7 @@ declare module "socket:fs/watcher" { * The encoding of the `filename` * @type {'utf8'|'buffer'} */ - encoding: "utf8" | "buffer"; + encoding: 'utf8' | 'buffer'; /** * A `AbortController` `AbortSignal` for async aborts. * @type {AbortSignal?} @@ -7000,7 +7000,7 @@ declare module "socket:application/client" { * The frame type of the client. * @type {'top-level'|'nested'|'none'} */ - get frameType(): "none" | "top-level" | "nested"; + get frameType(): "none" | "nested" | "top-level"; /** * The type of the client. * @type {'window'|'worker'} @@ -7032,10 +7032,10 @@ declare module "socket:application/client" { export default _default; export type ClientState = { id?: string | null; - type?: "window" | "worker"; + type?: 'window' | 'worker'; parent?: object | null; top?: object | null; - frameType?: "top-level" | "nested" | "none"; + frameType?: 'top-level' | 'nested' | 'none'; }; } @@ -7109,7 +7109,7 @@ declare module "socket:window/hotkey" { * @ignore * @param {import('../internal/events.js').HotKeyEvent} event */ - onHotKey(event: import("socket:internal/events").HotKeyEvent): boolean; + onHotKey(event: import('../internal/events.js').HotKeyEvent): boolean; /** * The number of `Binding` instances in the mapping. * @type {number} @@ -7322,7 +7322,6 @@ declare module "socket:window/hotkey" { */ export const bindings: Bindings; export default bindings; - import { HotKeyEvent } from "socket:internal/events"; } declare module "socket:window" { @@ -8047,7 +8046,7 @@ declare module "socket:internal/promise" { export const NativePromise: PromiseConstructor; export namespace NativePromisePrototype { export let then: (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => globalThis.Promise; - let _catch: (onrejected?: (reason: any) => TResult | PromiseLike) => globalThis.Promise; + let _catch: (onrejected?: (reason: any) => TResult | PromiseLike) => globalThis.Promise; export { _catch as catch }; let _finally: (onfinally?: () => void) => globalThis.Promise; export { _finally as finally }; @@ -8093,9 +8092,9 @@ declare module "socket:internal/promise" { readonly destroyed: boolean; asyncId(): number; triggerAsyncId(): number; - emitDestroy(): CoreAsyncResource; - bind(fn: Function, thisArg?: object | undefined): Function; - runInAsyncScope(fn: Function, thisArg?: object | undefined, ...args?: any[]): any; + emitDestroy(): asyncHooks.CoreAsyncResource; + bind(fn: Function, thisArg?: any): Function; + runInAsyncScope(fn: Function, thisArg?: any, ...args?: any[]): any; }; } export namespace Promise { @@ -8715,7 +8714,7 @@ declare module "socket:worker_threads" { * @ignore * @param {import('./process.js').ProcessEnvironmentEvent} event */ - onProcessEnvironmentEvent(event: import("socket:process").ProcessEnvironmentEvent): void; + onProcessEnvironmentEvent(event: import('./process.js').ProcessEnvironmentEvent): void; /** * The unique ID for this `Worker` thread instace. * @type {number} @@ -9869,7 +9868,7 @@ declare module "socket:extension" { * @param {string} name * @return {Promise<'shared'|'wasm32'|'unknown'|null>} */ - static type(name: string): Promise<"shared" | "wasm32" | "unknown" | null>; + static type(name: string): Promise<'shared' | 'wasm32' | 'unknown' | null>; /** * Provides current stats about the loaded extensions or one by name. * @param {?string} name @@ -9944,7 +9943,7 @@ declare module "socket:extension" { export type ExtensionLoadOptions = { allow: string[] | string; imports?: object; - type?: "shared" | "wasm32"; + type?: 'shared' | 'wasm32'; path?: string; stats?: object; instance?: WebAssembly.Instance; @@ -10370,7 +10369,7 @@ declare module "socket:internal/database" { export type DatabasePutOptions = { store?: string | undefined; stores?: string[] | undefined; - durability?: "strict" | "relaxed" | undefined; + durability?: 'strict' | 'relaxed' | undefined; }; /** * A typed container for various optional options made to a `delete()` function @@ -10434,7 +10433,7 @@ declare module "socket:service-worker/env" { * @param {'set'|'delete'} type * @param {object=} [entry] */ - constructor(type: "set" | "delete", entry?: object | undefined); + constructor(type: 'set' | 'delete', entry?: object | undefined); entry: any; } /** @@ -10566,7 +10565,7 @@ declare module "socket:service-worker/context" { * `Context` class constructor. * @param {import('./events.js').ExtendableEvent} event */ - constructor(event: import("socket:service-worker/events").ExtendableEvent); + constructor(event: import('./events.js').ExtendableEvent); /** * Context data. This may be a custom protocol handler scheme data * by default, if available. @@ -10607,7 +10606,7 @@ declare module "socket:service-worker/context" { * Gets the client for this event context. * @return {Promise} */ - client(): Promise; + client(): Promise; #private; } namespace _default { @@ -10794,7 +10793,7 @@ declare module "socket:http/adapters" { * @param {import('../http.js').Server} server * @param {HTTPModuleInterface} httpInterface */ - constructor(server: import("socket:http").Server, httpInterface: HTTPModuleInterface); + constructor(server: import('../http.js').Server, httpInterface: HTTPModuleInterface); /** * A readonly reference to the underlying HTTP(S) server * for this adapter. @@ -10829,13 +10828,13 @@ declare module "socket:http/adapters" { * @ignore * @param {import('../service-worker/events.js').ExtendableEvent} event */ - onInstall(event: import("socket:service-worker/events").ExtendableEvent): Promise; + onInstall(event: import('../service-worker/events.js').ExtendableEvent): Promise; /** * Handles the 'activate' service worker event. * @ignore * @param {import('../service-worker/events.js').ExtendableEvent} event */ - onActivate(event: import("socket:service-worker/events").ExtendableEvent): Promise; + onActivate(event: import('../service-worker/events.js').ExtendableEvent): Promise; /** * Handles the 'fetch' service worker event. * @ignore @@ -13475,7 +13474,7 @@ declare module "socket:test/index" { * @param {string} [msg] * @returns {void} */ - notDeepEqual(actual: T, expected: T, msg?: string): void; + notDeepEqual(actual: T_1, expected: T_1, msg?: string): void; /** * @template T * @param {T} actual @@ -13483,7 +13482,7 @@ declare module "socket:test/index" { * @param {string} [msg] * @returns {void} */ - equal(actual: T, expected: T, msg?: string): void; + equal(actual: T_2, expected: T_2, msg?: string): void; /** * @param {unknown} actual * @param {unknown} expected @@ -13732,7 +13731,7 @@ declare module "socket:test/index" { * }) * ``` */ - waitForText(selector: string | HTMLElement | Element, opts?: { + waitForText(selector: string | HTMLElement | Element, opts?: string | RegExp | { /** * - The text to wait for */ @@ -13743,7 +13742,7 @@ declare module "socket:test/index" { * The regex to wait for */ regex?: RegExp; - } | string | RegExp, msg?: string): Promise; + }, msg?: string): Promise; /** * Run a querySelector as an assert and also get the results * @@ -15024,7 +15023,7 @@ declare module "socket:commonjs/package" { * @param {PackageResolveOptions=} [options] * @return {string} */ - resolve(pathname: string | URL, options?: PackageResolveOptions | undefined): string; + resolve(pathname: string | URL, options?: PackageResolveOptions): string; #private; } export default Package; @@ -15035,13 +15034,13 @@ declare module "socket:commonjs/package" { version?: string; license?: string; exports?: object; - type?: "commonjs" | "module"; + type?: 'commonjs' | 'module'; info?: object; origin?: string; dependencies?: Dependencies | object | Map; }; export type PackageLoadOptions = import("socket:commonjs/loader").RequestOptions & { - type?: "commonjs" | "module"; + type?: 'commonjs' | 'module'; prefix?: string; }; export type ParsedPackageName = { @@ -15081,7 +15080,7 @@ declare module "socket:commonjs/module" { * @param {typeof process} process * @param {object} global */ - export function CommonJSModuleScope(exports: object, require: (arg0: string) => any, module: Module, __filename: string, __dirname: string, process: any, global: object): void; + export function CommonJSModuleScope(exports: object, require: (arg0: string) => any, module: Module, __filename: string, __dirname: string, process: typeof process, global: object): void; /** * Creates a `require` function from a given module URL. * @param {string|URL} url @@ -15441,7 +15440,7 @@ declare module "socket:commonjs/module" { * @throws TypeError * @return {any} */ - require(url: any, options?: RequireOptions | undefined): any; + require(url: any, options?: RequireOptions): any; /** * Loads the module * @param {ModuleLoadOptions=} [options] @@ -15479,9 +15478,9 @@ declare module "socket:commonjs/module" { export type ModuleLoadOptions = { extensions?: object; }; + import process from "socket:process"; import { Package } from "socket:commonjs/package"; import { Loader } from "socket:commonjs/loader"; - import process from "socket:process"; } declare module "socket:commonjs/require" { @@ -15540,7 +15539,7 @@ declare module "socket:commonjs/require" { * `Meta` class constructor. * @param {import('./module.js').Module} module */ - constructor(module: import("socket:commonjs/module").Module); + constructor(module: import('./module.js').Module); /** * The referrer (parent) of this module. * @type {string} @@ -16100,7 +16099,7 @@ declare module "socket:notification" { * @param {boolean=} [options.force = false] * @return {Promise<'granted'|'default'|'denied'>} */ - static requestPermission(options?: object | undefined): Promise<"granted" | "default" | "denied">; + static requestPermission(options?: object | undefined): Promise<'granted' | 'default' | 'denied'>; /** * `Notification` class constructor. * @param {string} title @@ -16286,9 +16285,9 @@ declare module "socket:service-worker/instance" { readonly state: any; readonly scriptURL: any; postMessage(): void; - addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void; + addEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; dispatchEvent(event: Event): boolean; - removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void; + removeEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; }; }; export default createServiceWorker; @@ -17004,7 +17003,7 @@ declare module "socket:internal/pickers" { * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/showOpenFilePicker} * @return {Promise} */ - export function showOpenFilePicker(options?: ShowOpenFilePickerOptions | undefined): Promise; + export function showOpenFilePicker(options?: ShowOpenFilePickerOptions): Promise; /** * @typedef {{ * id?: string, @@ -17024,7 +17023,7 @@ declare module "socket:internal/pickers" { * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/showSaveFilePicker} * @return {Promise} */ - export function showSaveFilePicker(options?: ShowSaveFilePickerOptions | undefined): Promise; + export function showSaveFilePicker(options?: ShowSaveFilePickerOptions): Promise; /** * Key-value store for general usage by the file pickers" * @ignore @@ -17046,8 +17045,8 @@ declare module "socket:internal/pickers" { export default _default; export type ShowDirectoryPickerOptions = { id?: string; - mode?: "read" | "readwrite"; - startIn?: FileSystemHandle | "desktop" | "documents" | "downloads" | "music" | "pictures" | "videos"; + mode?: 'read' | 'readwrite'; + startIn?: FileSystemHandle | 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos'; }; /** * ]?: string[] @@ -17057,10 +17056,10 @@ declare module "socket:internal/pickers" { export type object = { id?: string; excludeAcceptAllOption?: boolean; - startIn?: FileSystemHandle | "desktop" | "documents" | "downloads" | "music" | "pictures" | "videos"; + startIn?: FileSystemHandle | 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos'; types?: Array<{ description?: string; - [keyof]: any; + [keyof]; }>; }; } @@ -17161,7 +17160,7 @@ declare module "socket:npm/module" { */ export function resolve(specifier: string | URL, origin?: (string | URL) | undefined, options?: { prefix?: string; - type?: "commonjs" | "module"; + type?: 'commonjs' | 'module'; }): ModuleResolution | null; namespace _default { export { resolve }; @@ -17170,7 +17169,7 @@ declare module "socket:npm/module" { export type ModuleResolution = { package: Package; origin: string; - type: "commonjs" | "module"; + type: 'commonjs' | 'module'; url: string; }; import { Package } from "socket:commonjs/package"; @@ -17251,8 +17250,8 @@ declare module "socket:service-worker/init" { } declare function isTypedArray(object: any): boolean; declare function isTypedArray(object: any): boolean; -declare function isArrayBuffer(object: any): object is ArrayBuffer; -declare function isArrayBuffer(object: any): object is ArrayBuffer; +declare function isArrayBuffer(object: any): boolean; +declare function isArrayBuffer(object: any): boolean; declare function findMessageTransfers(transfers: any, object: any, options?: any): any; declare function findMessageTransfers(transfers: any, object: any, options?: any): any; declare const Uint8ArrayPrototype: Uint8Array; @@ -17266,7 +17265,7 @@ declare module "socket:service-worker/storage" { * @param {'memoryStorage'|'localStorage'|'sessionStorage'} type * @return {Promise} */ - export function createStorageInterface(type: "memoryStorage" | "localStorage" | "sessionStorage"): Promise; + export function createStorageInterface(type: 'memoryStorage' | 'localStorage' | 'sessionStorage'): Promise; /** * @typedef {{ done: boolean, value: string | undefined }} IndexIteratorResult */ @@ -17716,12 +17715,12 @@ declare module "socket:test/harness" { * @param {new (options: object) => T} harnessClass * @returns {TapeTestFn} */ - export function wrapHarness(tapzero: typeof import("socket:test/index"), harnessClass: new (options: object) => T): TapeTestFn; + export function wrapHarness(tapzero: typeof import("socket:test/index"), harnessClass: new (options: object) => T): exports.TapeTestFn; export default exports; /** * @template {Harness} T */ - export class TapeHarness { + export class TapeHarness { /** * @param {import('./index.js')} tapzero * @param {new (options: object) => T} harnessClass @@ -17774,7 +17773,7 @@ declare module "socket:test/harness" { bootstrap(): Promise; close(): Promise; }; - export type TapeTestFn = { + export type TapeTestFn = { (name: string, cb?: (harness: T, test: Test) => (void | Promise)): void; (name: string, opts: object, cb: (harness: T, test: Test) => (void | Promise)): void; only(name: string, cb?: (harness: T, test: Test) => (void | Promise)): void; @@ -17791,8 +17790,8 @@ declare module "socket:vm/init" { } declare function isTypedArray(object: any): boolean; declare function isTypedArray(object: any): boolean; -declare function isArrayBuffer(object: any): object is ArrayBuffer; -declare function isArrayBuffer(object: any): object is ArrayBuffer; +declare function isArrayBuffer(object: any): boolean; +declare function isArrayBuffer(object: any): boolean; declare function findMessageTransfers(transfers: any, object: any, options?: any): any; declare function findMessageTransfers(transfers: any, object: any, options?: any): any; declare const Uint8ArrayPrototype: Uint8Array;