From 76f041f6bcf46b70c159e8861f07429b60a54d92 Mon Sep 17 00:00:00 2001 From: Nicolas Morel Date: Tue, 7 Jan 2025 23:25:11 +0100 Subject: [PATCH] fix: typescript exactOptionalPropertyTypes issue --- lib/index.d.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index d20052a..2528128 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -169,12 +169,12 @@ declare namespace Podium { /** * Channel name. */ - readonly channel?: string; + readonly channel?: string | undefined; /** * The tags to apply. */ - readonly tags?: string | string[] | { [tag: string]: boolean }; + readonly tags?: string | string[] | { [tag: string]: boolean } | undefined; } export type EmitCriteria = EmitCriteriaInterface | TName @@ -191,7 +191,7 @@ declare namespace Podium { * * Defaults to no channel restrictions - Event updates can specify a channel or not. */ - readonly channels?: string | string[]; + readonly channels?: string | string[] | undefined; /** * Set to make podium.emit() clone the data object passed to it, before it is passed to the @@ -199,7 +199,7 @@ declare namespace Podium { * * Defaults to false - Data is passed as-is. */ - readonly clone?: boolean; + readonly clone?: boolean | undefined; /** * Set to require the data object passed to podium.emit() to be an array, and make the @@ -210,7 +210,7 @@ declare namespace Podium { * * Defaults to false - Data is emitted as a single argument regardless of its type. */ - readonly spread?: boolean; + readonly spread?: boolean | undefined; /** * Set to make any tags in the critieria object passed to podium.emit() map to an object @@ -221,7 +221,7 @@ declare namespace Podium { * * Defaults to false. */ - readonly tags?: boolean; + readonly tags?: boolean | undefined; /** * Set to allow the same event name to be registered multiple times, ignoring all but the @@ -232,7 +232,7 @@ declare namespace Podium { * * Defaults to false - A duplicate registration will throw an error. */ - readonly shared?: boolean; + readonly shared?: boolean | undefined; } type EventOptions = EventOptionsInterface | TName @@ -247,7 +247,7 @@ declare namespace Podium { * * Defaults to true */ - readonly validate?: boolean; + readonly validate?: boolean | undefined; } type Listener = @@ -258,14 +258,14 @@ declare namespace Podium { /** * A tag string or array of tag strings. */ - readonly tags?: string | string[]; + readonly tags?: string | string[] | undefined; /** * Require all tags to be present for the event update to match the subscription. * * Default false - Require at least one matching tag. */ - readonly all?: boolean; + readonly all?: boolean | undefined; } interface CriteriaInterface { @@ -284,7 +284,7 @@ declare namespace Podium { * * Defaults to no channels filter. */ - readonly channels?: string | string[]; + readonly channels?: string | string[] | undefined; /** * Set to clone the data object passed to podium.emit() before it is passed to the listener @@ -292,7 +292,7 @@ declare namespace Podium { * * Defaults to the event registration option (which defaults to false). */ - readonly clone?: boolean; + readonly clone?: boolean | undefined; /** * A positive non-zero integer indicating the number of times the listener can be called @@ -302,12 +302,12 @@ declare namespace Podium { * * Defaults to no limit. */ - readonly count?: number; + readonly count?: number | undefined; /** * The event tags (if present) to subscribe to. */ - readonly filter?: string | string[] | CriteriaFilterOptionsObject; + readonly filter?: string | string[] | CriteriaFilterOptionsObject | undefined; /** * Override the value of spread from the event registraiont when the listener is called. @@ -316,14 +316,14 @@ declare namespace Podium { * * Defaults to the event registration option (which defaults to false). */ - readonly spread?: boolean; + readonly spread?: boolean | undefined; /** * Override the value of tags from the event registraiont when the listener is called. * * Defaults to the event registration option (which defaults to false). */ - readonly tags?: boolean; + readonly tags?: boolean | undefined; } export type Criteria = CriteriaInterface | TName