在简单的module.exports语句之后,WebStorm无法识别类型

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

我在我的非TypeScript服务器中使用了一些用TypeScript编写的npm模块。

WebStorm做得很好,自动完成了我:

enter image description here

我正在使用一个简单的module.exports使这个ldClient可以在文件外访问:

const LaunchDarkly = require('ldclient-node');
const ldClient                 = LaunchDarkly.init(process.env.LAUNCH_DARKLY_DEV_KEY);
module.exports                 = ldClient;

当需要此文件时,WebStorm不再自动完成我:

enter image description here

然而,当使用import * from '....' WebStorm成功时,对于技术问题,我没有使用它的权限。

有任何想法吗?

node.js typescript webstorm
1个回答
0
投票

记录为WEB-31531,请按照此票证进行更新

© www.soinside.com 2019 - 2024. All rights reserved.