DENO JSX上的错误示例:属性'原因'在类型上不存在aportignal'

发布于 2025-02-10 10:18:30 字数 1848 浏览 0 评论 0原文

我按照在此处显示的

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文