Closed niklasvieth closed 2 months ago
Sure I can look into that. Thanks for already providing types file.
Just FYI: functions like processPeriodicEvent and processEvent
should not be called specificallyy. The framework will do this. The function to trigger the processing of the event-queue manually is processEventQueue
--> this function is also exposed via index.js of the package.
Maybe I need to add this to the documentation.
Hi @soccermax,
really like the library, currently looking into using it in a project. I prefer using CAP Typescript though, unfortunately does not work out of the box because of the missing type definitions.![image](https://github.com/cap-js-community/event-queue/assets/41342090/168d373e-0b5e-4382-b98f-9954ef228d2a)
It may be possible to generate the types out of the existing JSDoc (see https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html)
I tried it, for most of the files it kind of works already.
As temporary workaround I declared the types myself for the methods I may use in the project by adding a
event-queue.d.ts
file like this:Would be awesome if the library exports the types of the most commonly used methods like
publishEvent
,processPeriodicEvent
andprocessEvent
.Thanks in advance! BR Niklas