From 59b67fa00c1a39156c92e006dc4157d107fe0ae6 Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Thu, 12 Jan 2023 13:10:13 -0500 Subject: [PATCH] docs: add note about required `strictNullChecks` option (#800) * docs: add note about required `strictNullChecks` option * Update README.md Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com> * Update README.md Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com> --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9919358b..019d0348 100644 --- a/README.md +++ b/README.md @@ -718,6 +718,8 @@ In addition to these types, `@octokit/webhooks` exports 2 types specific to itse Note that changes to the exported types are not considered breaking changes, as the changes will not impact production code, but only fail locally or during CI at build time. +**⚠️ Caution ⚠️**: Webhooks Types are expected to be used with the [`strictNullChecks` option](https://www.typescriptlang.org/tsconfig#strictNullChecks) enabled in your `tsconfig`. If you don't have this option enabled, there's the possibility that you get `never` as the inferred type in some use cases. See [octokit/webhooks#395](https://github.com/octokit/webhooks/issues/395) for details. + ### `EmitterWebhookEventName` A union of all possible events and event/action combinations supported by the event emitter, e.g. `"check_run" | "check_run.completed" | ... many more ... | "workflow_run.requested"`.