摘要: class Base { prop = null; } class Derived extends Base { derived = null; } class Another { another = null; } function fn(someClass: { prototype: Base 阅读全文
posted @ 2021-04-11 09:18 TheNightmareX 阅读(195) 评论(0) 推荐(0)
摘要: Typesciprt提供`compilerOptions.baseUrl`选项设置非相对路径模块导入的根路径 // tsconfig.json{ "compilerOptions": { "baseUrl": "./" } } Typescript可正常编译,但运行Jest报错 Cannot fin 阅读全文
posted @ 2021-03-28 15:36 TheNightmareX 阅读(1244) 评论(0) 推荐(1)
摘要: declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace NodeJS { export interface ProcessEnv { key: string; } } } 阅读全文
posted @ 2021-03-27 23:54 TheNightmareX 阅读(911) 评论(0) 推荐(1)