Files
NapCatQQ/.pnpm-store/v3/files/da/082ab955026b65673d1ad0ea895a063d06ba89c7cc7da3230c96a53767c868f3acfc552d9a1e6366322e83384f4b30d040713eedd7b925986be0f5b978f956
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

54 lines
1.6 KiB
Plaintext

import * as ts from 'typescript';
/**
* @example
* ```ts
* class DerivedClass extends Promise<number> {}
* DerivedClass.reject
* // ^ PromiseLike
* ```
*/
export declare function isPromiseLike(program: ts.Program, type: ts.Type): boolean;
/**
* @example
* ```ts
* const value = Promise
* value.reject
* // ^ PromiseConstructorLike
* ```
*/
export declare function isPromiseConstructorLike(program: ts.Program, type: ts.Type): boolean;
/**
* @example
* ```ts
* class Foo extends Error {}
* new Foo()
* // ^ ErrorLike
* ```
*/
export declare function isErrorLike(program: ts.Program, type: ts.Type): boolean;
/**
* @example
* ```ts
* type T = Readonly<Error>
* // ^ ReadonlyErrorLike
* ```
*/
export declare function isReadonlyErrorLike(program: ts.Program, type: ts.Type): boolean;
/**
* @example
* ```ts
* type T = Readonly<{ foo: 'bar' }>
* // ^ ReadonlyTypeLike
* ```
*/
export declare function isReadonlyTypeLike(program: ts.Program, type: ts.Type, predicate?: (subType: {
aliasSymbol: ts.Symbol;
aliasTypeArguments: readonly ts.Type[];
} & ts.Type) => boolean): boolean;
export declare function isBuiltinTypeAliasLike(program: ts.Program, type: ts.Type, predicate: (subType: {
aliasSymbol: ts.Symbol;
aliasTypeArguments: readonly ts.Type[];
} & ts.Type) => boolean): boolean;
export declare function isBuiltinSymbolLike(program: ts.Program, type: ts.Type, symbolName: string | string[]): boolean;
export declare function isBuiltinSymbolLikeRecurser(program: ts.Program, type: ts.Type, predicate: (subType: ts.Type) => boolean | null): boolean;