Insights: Fix optional buildInfo type (#70372)

fix unnecessary optional type
This commit is contained in:
Sven Grossmann 2023-06-20 13:04:54 +02:00 committed by GitHub
parent 39a18ca6ba
commit bdc1d666f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,10 +30,10 @@ declare global {
export interface RudderstackBackendOptions { export interface RudderstackBackendOptions {
writeKey: string; writeKey: string;
dataPlaneUrl: string; dataPlaneUrl: string;
buildInfo: BuildInfo;
user?: CurrentUserDTO; user?: CurrentUserDTO;
sdkUrl?: string; sdkUrl?: string;
configUrl?: string; configUrl?: string;
buildInfo?: BuildInfo;
} }
export class RudderstackBackend implements EchoBackend<PageviewEchoEvent, RudderstackBackendOptions> { export class RudderstackBackend implements EchoBackend<PageviewEchoEvent, RudderstackBackendOptions> {
@ -86,8 +86,8 @@ export class RudderstackBackend implements EchoBackend<PageviewEchoEvent, Rudder
email: options.user.email, email: options.user.email,
orgId: options.user.orgId, orgId: options.user.orgId,
language: options.user.language, language: options.user.language,
version: options.buildInfo?.version ?? 'unknown', version: options.buildInfo.version,
edition: options.buildInfo?.edition ?? 'unknown', edition: options.buildInfo.edition,
}, },
apiOptions apiOptions
); );