Files
NapCatQQ/.pnpm-store/v3/files/4c/dafde875a69ed9360c3f29dfa7ebe9372e123ef50cca0748d9b9ad2e91f5936980ed1a104274099771cdb9836c9adee6f9d418171ec7b8bcb327bcfdc0384e
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

33 lines
1.3 KiB
Plaintext

declare function isPromise<T>(object: unknown): object is Promise<T>;
type Either<TLeft, TRight> = Left<TLeft> | Right<TRight>;
interface BaseEither<T> {
value: T;
}
interface Left<T> extends BaseEither<T> {
isRight: false;
}
interface Right<T> extends BaseEither<T> {
isRight: true;
}
type AbstractNewable<TInstance = unknown, TArgs extends unknown[] = any[]> = abstract new (...args: TArgs) => TInstance;
type Newable<TInstance = unknown, TArgs extends unknown[] = any[]> = new (...args: TArgs) => TInstance;
type ServiceIdentifier<TInstance = unknown> = string | symbol | Newable<TInstance> | AbstractNewable<TInstance> | Function;
declare function stringifyServiceIdentifier(serviceIdentifier: ServiceIdentifier): string;
declare const islazyServiceIdentifierSymbol: unique symbol;
declare class LazyServiceIdentifier<TInstance = unknown> {
#private;
[islazyServiceIdentifierSymbol]: true;
constructor(buildServiceId: () => ServiceIdentifier<TInstance>);
static is<TInstance = unknown>(value: unknown): value is LazyServiceIdentifier<TInstance>;
unwrap(): ServiceIdentifier<TInstance>;
}
export { LazyServiceIdentifier, isPromise, stringifyServiceIdentifier };
export type { AbstractNewable, BaseEither, Either, Left, Newable, Right, ServiceIdentifier };