我想将其导入到我的 TypeScript 项目中:
import { ID } from "type-graphql";
但我无法安装 type-graphql。我尝试了这个,但它给了我一个 404 错误,说在 nam 注册表中找不到这个
npm install @types/type-graphql
最佳答案
带有前缀@types/
的包只是 typescript 的类型定义
type-graphql 是基于 typescript 构建的,
所以你不需要安装@types/type-graphql
只需安装type-graphql
请遵循文档https://typegraphql.com/docs/installation.html#packages-installation
关于javascript - 如何安装type-graphql?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61159565/