因此,基本上,我想使用TypeScript来检查我的代码在编辑器中是否有错误(VS代码),但不想执行任何转换步骤。我在.js文件中有我的代码,"allowJs":tsconfig.json中的真declare module "something" {export interface MyInterface { "'module' declarations can only be used in Type
我正在尝试提出以下TypeScript类型断言函数的JavaScript+JSDoc变体: function typeCheck<T>(value: unknown, type: new () =>instantiated with an arbitrary type which could be unrelated to 'HTMLButtonElement'.ts(2345) 有没有可能开发这样的JSDoc函数,当传递该函数时,unknown将仅使用TypeScript</