FreeWong

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

  •  
  •   FreeWong · May 14, 2024 · 2194 views
    This topic created in 795 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   ·   904 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 20:46 · PVG 04:46 · LAX 13:46 · JFK 16:46
    ♥ Do have faith in what you're doing.