因与 OpenAI 合作而被删除。我的帐户可能会被删除,这是我的意图

问题描述 投票:0回答:2

因与 OpenAI 合作而被删除。我的帐户很可能会被删除,这是我的意图。

typescript typescript-typings bun
2个回答
21
投票

因与 OpenAI 合作而被删除。我的帐户很可能会被删除,这是我的意图。


2
投票

以上对我不起作用,我得到

Cannot find name 'Bun' .ts(2304)
错误vscode doesnt see bun types

我重新启动了 vscode,下载了 Bun vscode 扩展,什么都没有..仍然没有显示类型。

我使用默认的

bun init
配置

UPD 通过更改为此 tsconfig 解决:

{
  "compilerOptions": {
    // add Bun type definitions
    "types": ["bun-types"],

    // enable latest features
    "lib": ["esnext"],
    "module": "esnext",
    "target": "esnext",

    "moduleResolution": "bundler",
    "noEmit": true,
    "allowImportingTsExtensions": true,
    "moduleDetection": "force",

    "jsx": "react-jsx", // support JSX
    "allowJs": true, // allow importing `.js` from `.ts`
    "esModuleInterop": true, // allow default imports for CommonJS modules

    // best practices
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "skipLibCheck": true
  }
}
© www.soinside.com 2019 - 2024. All rights reserved.