跳至内容

Meteor 3 类型

为了在您的 Meteor 3 项目中启用类型,您需要添加以下包

bash
meteor add zodern:types

此外,为了使 IDE 中 Meteor 核心包的类型正常工作,您需要在项目根目录中有一个有效的 tsconfig.json 文件,其中包含以下内容

json
{
  "compilerOptions": {
    "preserveSymlinks": true,
    "paths": {
      "meteor/*": [
        ".meteor/local/types/packages.d.ts"
      ]
    }
  }
}

您可以在 此处 了解更多关于 zodern:types 包的信息。