cloudevents / sdk-javascript

JavaScript/TypeScript SDK for CloudEvents
https://cloudevents.github.io/sdk-javascript/
Apache License 2.0
342 stars 69 forks source link

No .d.ts files available for browser bundle #531

Open cbrianball opened 1 year ago

cbrianball commented 1 year ago

Describe the Bug Based on the websockets example, it appears that browsers should use the cloudevents bundle (i.e. import { CloudEvent } from "cloudevents/bundles/cloudevents";)

If that's true, there are no .d.ts files for that file -- TypeScript complains about not having any typings available for the module.

Additional context I'm working around the issue right now by declare my own .d.ts file in my project that looks like this:

declare module "cloudevents/bundles/cloudevents" {
  export { CloudEvent } from "cloudevents";
}
github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity.

lholmquist commented 4 weeks ago

@cbrianball if your workaround works, then keep going with that