V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
FreeWong

==TypeScript 写的 npm 包可以用 javascript 使用包的函数吗

  •  
  •   FreeWong · May 14, 2024 · 2045 views
    This topic created in 720 days ago, the information mentioned may be changed or developed.
    https://github.com/cody-greene/node-rabbitmq-client
    这个是用 TypeScript 写的一个 npm 包,我不会 TS, 但是会用 JavaScript 写 node 应用
    这样我可以直接用 JS 调用这个包的函数吗
    多谢
    rookie2luochao
        1
    rookie2luochao  
       May 14, 2024
    只要这个包也支持你 nodejs 应用的模块方式,大概率是可以的,大不了全部 any
    sq955
        2
    sq955  
       May 15, 2024 via Android
    tsc 编译一下,生成 js 文件和 d.ts 类型文件
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1001 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:50 · PVG 07:50 · LAX 16:50 · JFK 19:50
    ♥ Do have faith in what you're doing.