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

latest type definition for deno deploy #123

Open
ayame113 opened this issue Oct 29, 2021 · 2 comments
Open

latest type definition for deno deploy #123

ayame113 opened this issue Oct 29, 2021 · 2 comments

Comments

@ayame113
Copy link

ayame113 commented Oct 29, 2021

How do I get the latest type definition for deno deploy?

The type definitions at https://deno.land/x/deploy@0.4.0/types/deploy.window.d.ts are out of date (no URLPattern API) and the repository is archived.

I know I can use the type definition for the deno CLI instead, but it would be nice if I could find out by type checking that I'm using an API that exists in the CLI but not in deploy.

related denoland/deployctl#24, denoland/deployctl#53

@MrEmanuel
Copy link

MrEmanuel commented Dec 26, 2021

I would also like to see this fixed/explained.

For anyone looking for a fix, I couldn't get the types working via a deno settings file as recommended by jsejcksn here: denoland/deployctl#24 (comment)
I could only get this to work with the tripple slash method.

  1. pipe the types from deployctl to a local file with the command deployctl types > deploy.d.ts
  2. reference/import the types where you want to use them: /// <reference path="./deploy.d.ts" />

@ayame113
Copy link
Author

I have created https://deno.land/x/deploy_type_checker to typecheck a deno deploy project.
We can run type checking with command deno run --allow-read --allow-run https://deno.land/x/deploy_type_checker@v0.0.4/type_check.ts ./your_code.ts.
We can use this until we get the official type check command.

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

No branches or pull requests

2 participants