@tsailab/xai
Version:
The loto-xai is an openai nodejs sdk compatible extension library.
23 lines (22 loc) • 557 B
TypeScript
/**
* @public
* @property code reffer backend ErrorCode
* see @tsai-platform/common ErrorCodeEnum
*/
export interface IXaiError extends Error {
code?: number;
}
export interface ErrorOptions {
cause?: unknown;
}
export interface XaiErrorProperties {
[property: string]: any;
}
export interface XaiErrorContructor<P extends XaiErrorProperties> extends ErrorConstructor {
readonly prototype: IXaiError;
new (...args: any[]): IXaiError & P;
(...args: any): IXaiError & P;
}
export interface XaiErrorDataType {
code?: number;
}