fails-components / webtransport

Http/3 webtransport support for node
Other
146 stars 20 forks source link

Type errors on latest #250

Closed roobscoob closed 6 months ago

roobscoob commented 6 months ago

img

an index.d.ts file is looked for, but only index.browser.d.ts and index.node.d.ts exist.

martenrichter commented 6 months ago

Ok, I thought we have fixed this here: https://github.com/fails-components/webtransport/issues/233

I am sorry, but I am not using typescript, so I often encounter these problems.

Of course, I would like to fix this. Anyone an idea, who has a knowledge of types? This is an open problem... https://github.com/microsoft/TypeScript/issues/29128

I could make the node version default?

endel commented 6 months ago

Hi @martenrichter 👋 I think it is safe to use the "node" version for the types as default. I don't think this package would be used to target web browsers

martenrichter commented 6 months ago

Well, it could be if the polyfill/ponyfill feature is used for web transport over websocket. I was thinking, if I create a joint index file just for types, where I include both...