Skip to content

Commit a5befbe

Browse files
authored
fix: introduce CloudEventV1 and CloudEventV03 interfaces (#194)
This 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 extends. This allows TS devs to optionally provide `id` and `specversion` with proper autocompletion. Additionally, I have added a union type, `CE` in `cloudevent.ts` which represents any of `CloudEventV1`, `CloudEventv03`, `CloudEventV1Attributes` and `CloudEventV03Attributes` interfaces. Finally, this commit changes all of the user facing API to be `.ts` instead of `.js` files. The existing documentation in `./docs` was removed. It should be replaced with generated HTML from tsdocs, pending some other method of publishing API documentation. That will come as a separate, docs-only PR. Fixes: https://github.com/cloudevents/skd-javascript/issues/188 Signed-off-by: Lance Ball <lball@redhat.com>
1 parent 15cd763 commit a5befbe

File tree

99 files changed

+501
-25286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+501
-25286
lines changed

Diff for: .gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
77

8-
# Generated typedefs
8+
# Generated files
99
*.d.ts
10+
index.js
11+
lib
1012

1113
# Runtime data
1214
pids

Diff for: .jsdoc.json

-30
This file was deleted.

0 commit comments

Comments
 (0)