@types/bluebird 给出以下错误:
node_modules/@types/bluebird/index.d.ts(623,33): error TS2304: Cannot find name 'Map'.
node_modules/@types/bluebird/index.d.ts(623,78): error TS2304: Cannot find name 'Map'.
node_modules/@types/bluebird/index.d.ts(810,39): error TS2304: Cannot find name 'Map'.
node_modules/@types/bluebird/index.d.ts(810,78): error TS2304: Cannot find name 'Map'.
node_modules/@types/bluebird/index.d.ts(813,27): error TS2304: Cannot find name 'Map'.
node_modules/@types/bluebird/index.d.ts(813,65): error TS2304: Cannot find name 'Map'.
嗨 - 我认为你仍然在错误的位置。 这是不再使用的命令行工具 tsd 的 repo。 当我在这里时,我怀疑您的问题是您的 tsconfig.json 文件中没有正确的“lib”设置。 看这里。 https://www.typescriptlang.org/docs/handbook/compiler-options.html您可能需要 lib "es2015" 来获取 Map。 lib 设置基本上让 TypeScript 知道您的环境中可用的内容。 希望有帮助。 如果不是,堆栈溢出是寻求帮助的正确地方,因为您在上面描述的不是定义中的错误。
最有用的评论
嗨 - 我认为你仍然在错误的位置。 这是不再使用的命令行工具 tsd 的 repo。 当我在这里时,我怀疑您的问题是您的 tsconfig.json 文件中没有正确的“lib”设置。 看这里。 https://www.typescriptlang.org/docs/handbook/compiler-options.html您可能需要 lib "es2015" 来获取 Map。 lib 设置基本上让 TypeScript 知道您的环境中可用的内容。 希望有帮助。 如果不是,堆栈溢出是寻求帮助的正确地方,因为您在上面描述的不是定义中的错误。