cloudflare / cloudflare/workerd
@cloudflare/workers-types overwrites DOM types from typescript and blows up typechecking
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
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);
```
Contributor guide
Assessment
This issue has not been assessed yet.