比如在 electron 中,我们可以
var lodash1 = require('./lib/lodash.min')
我想要 vscode 能在 lodash1. 的时候自动提示 'each ...方法'
然后我们有 ./typings/lodash/index.d.ts
如何指定这个 lodash1 变量用到这样的一个 index.d.ts 呢
注意:
lodash.min.js只是一个项目中的地址,不是npm安装的node_modules目录下lodash/index.d.ts也是项目中的地址,不是npm安装的node_modules目录下
请问有什么解决办法吗?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
文件最开始添加引用
///<reference path='index.d.ts' />大概是这样,具体你可以去看typings的文档,有写的很清楚