FreeWong

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

  •  
  •   FreeWong · May 14, 2024 · 2211 views
    This topic created in 804 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   ·   925 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: c2a72e2c · 26ms · UTC 21:10 · PVG 05:10 · LAX 14:10 · JFK 17:10
    ♥ Do have faith in what you're doing.