通过使用 declare 它将定义一个类类型。类型只是定义的,不应该有实现。export declare namespace UKey { const ALG: number; interface IKey { GetLibVersion(): string; } abstract class CodeException extends Error { static readonly SUCCESS:number; static readonly OPERATION_FAILED:number; abstract getErrorCode(): number abstract getMessage(): string; } }
通过使用 declare 它将定义一个类类型。类型只是定义的,不应该有实现。