Home
Sign Up
Sign In
V2EX
›
TypeScript
vscode 纯 js 项目有类型推断和成员变量提示,但是如果 ts 混用的话, js 导入就全变成 any 了,请问有办法解决吗
treblex
·
Mar 10, 2024
· 2287 views
This topic created in 971 days ago, the information mentioned may be changed or developed.
VSCode
tsconfig.json
类型推断
2 replies
RedNax
Mar 10, 2024
1
1
// ts-check
以及 JSDoc
主要看文档
https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html
和
https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html
但说实话真不如直接转成 TS
treblex
OP
Mar 10, 2024
2
@
RedNax
😂确实纯 ts 和纯 js 体验都挺好,有时候想偷个懒
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
2218 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 37ms ·
UTC 11:25
·
PVG 19:25
·
LAX 03:25
·
JFK 06:25
♥ Do have faith in what you're doing.
❯