Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👍 Stop using timeout module which cause TS2304 #77

Merged
merged 1 commit into from
Jul 10, 2021
Merged

Conversation

lambdalisue
Copy link
Member

@lambdalisue lambdalisue commented Jul 10, 2021

Loading https://deno.land/x/[email protected] in denops.vim cause

[denops] Unexpected error occured in 'bcdice-api' (C:\home\develop\denops-bcdice-api.vim\denops\bcdice-api\main.ts): TypeError: TS2304 [ERROR]: Cannot find name 'window'.
[denops]   const promise = window.fetch(input, { signal, ...init })
[denops]                   ~~~~~~
[denops]     at https://deno.land/x/[email protected]/abort.ts:40:19

It's because abortable module used in timeout module does not support Worker environment

```
[denops] Unexpected error occured in 'bcdice-api' (C:\home\develop\denops-bcdice-api.vim\denops\bcdice-api\main.ts): TypeError: TS2304 [ERROR]: Cannot find name 'window'.
[denops]   const promise = window.fetch(input, { signal, ...init })
[denops]                   ~~~~~~
[denops]     at https://deno.land/x/[email protected]/abort.ts:40:19
```

It's because `abortable` module used in `timeout` module does not support Worker environment
@lambdalisue
Copy link
Member Author

We may use timeout in std if denoland/std#1022 is merged.

@lambdalisue lambdalisue merged commit e1e205e into main Jul 10, 2021
@lambdalisue lambdalisue deleted the stop-timeout branch July 10, 2021 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant