-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: extract CloudEventVXAttributes and extend the interface
This commit extracts all of the attributes from a `CloudEventVX` that are not generated by the constructor (id and specversion) into their own `CloudEventVXAttributes` interface which the `CloudEventVX` interface now extends. This allows TS devs to optionally provide `id` and `specversion` with proper autocompletion. Additionally, I have added a union type, `Event` in `cloudevent.ts` which represents any of `CloudEventV1`, `CloudEventv03`, `CloudEventV1Attributes` and `CloudEventV03Attributes`. Signed-off-by: Lance Ball <lball@redhat.com>
- Loading branch information
Showing
5 changed files
with
34 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters