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