DENO JSX上的错误示例:属性'原因'在类型上不存在aportignal'
我按照在此处显示的
deno run --allow-net=:8000 https://deno.com/examples/hello.jsx
东西
Check https://deno.com/examples/hello.jsx
error: TS2339 [ERROR]: Property 'reason' does not exist on type 'AbortSignal'.
return Promise.reject(createAbortError(signal.reason));
~~~~~~
at https://deno.land/[email protected]/async/abortable.ts:27:51
TS2339 [ERROR]: Property 'reason' does not exist on type 'AbortSignal'.
const abort = () => waiter.reject(createAbortError(signal.reason));
~~~~~~
at https://deno.land/[email protected]/async/abortable.ts:30:61
TS2339 [ERROR]: Property 'reason' does not exist on type 'AbortSignal'.
throw createAbortError(signal.reason);
~~~~~~
at https://deno.land/[email protected]/async/abortable.ts:46:35
TS2339 [ERROR]: Property 'reason' does not exist on type 'AbortSignal'.
const abort = () => waiter.reject(createAbortError(signal.reason));
~~~~~~
at https://deno.land/[email protected]/async/abortable.ts:49:61
Found 4 errors.
有一些 我在这里不想念吗?对于记录,hello.js
示例在我运行时效果很好。
I ran the example JSX Deno script as shown here
deno run --allow-net=:8000 https://deno.com/examples/hello.jsx
and got the following output
Check https://deno.com/examples/hello.jsx
error: TS2339 [ERROR]: Property 'reason' does not exist on type 'AbortSignal'.
return Promise.reject(createAbortError(signal.reason));
~~~~~~
at https://deno.land/[email protected]/async/abortable.ts:27:51
TS2339 [ERROR]: Property 'reason' does not exist on type 'AbortSignal'.
const abort = () => waiter.reject(createAbortError(signal.reason));
~~~~~~
at https://deno.land/[email protected]/async/abortable.ts:30:61
TS2339 [ERROR]: Property 'reason' does not exist on type 'AbortSignal'.
throw createAbortError(signal.reason);
~~~~~~
at https://deno.land/[email protected]/async/abortable.ts:46:35
TS2339 [ERROR]: Property 'reason' does not exist on type 'AbortSignal'.
const abort = () => waiter.reject(createAbortError(signal.reason));
~~~~~~
at https://deno.land/[email protected]/async/abortable.ts:49:61
Found 4 errors.
Is there something I'm missing here? For the record, the hello.js
example works great when I run that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论