【发布时间】:2020-12-09 04:29:19
【问题描述】:
我尝试在我的measure.ts 脚本中使用以下代码:
Deno.DatagramConn.send(...)
当我像这样运行我的脚本时:deno run --unstable --allow-all measure.ts 我收到以下错误:
Property 'DatagramConn' does not exist on type 'typeof Deno'. 'Deno.DatagramConn' is an
unstable API. Did you forget to run with the '--unstable' flag?
这个错误似乎同时否认和确认Deno.DatagramConn API 的存在
我也试过了
Deno.connect({transport : 'udp'})
但这给了我以下错误(这可能是有道理的,因为 UDP 是“无连接”的):
Type '"udp"' is not assignable to type '"tcp"
【问题讨论】: