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

@cloudflare/workers-types overwrites DOM types from typescript and blows up typechecking #2874

Open
abhishiv opened this issue Oct 9, 2024 · 0 comments
Assignees
Labels
bug Something isn't working types Related to @cloudflare/workers-types

Comments

@abhishiv
Copy link

abhishiv commented Oct 9, 2024

Hello, I have a application which uses a dependency which has declared @cloudflare/workers-types as a optional peer dependency(drizzle-orm).

As of 4.20241004.0 including @cloudflare/workers-types overwrites DOM types which come with typescript. Therefor my whole application blows up while typechecking.

Sample errors

../../packages/public/alfama/src/dom/api.ts:136:28 - error TS2345: Argument of type 'DOMNodeType' is not assignable to parameter of type 'string | (string & Node)'.
  Type 'HTMLElement' is not assignable to type 'string | (string & Node)'.
    Type 'HTMLElement' is not assignable to type 'string & Node'.
      Type 'HTMLElement' is not assignable to type 'string'.
136           parentDOM.append(elementsToInsert);
../../packages/public/alfama/src/dom/api.ts:121:27 - error TS2345: Argument of type 'DOMNodeType' is not assignable to parameter of type 'string'.
  Type 'HTMLElement' is not assignable to type 'string'.
121       renderCtx.el.append(node.dom);
@abhishiv abhishiv added the types Related to @cloudflare/workers-types label Oct 9, 2024
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Oct 9, 2024
@emily-shen emily-shen added the bug Something isn't working label Oct 9, 2024
@andyjessop andyjessop removed this from workers-sdk Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working types Related to @cloudflare/workers-types
Projects
None yet
Development

No branches or pull requests

3 participants