refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
Signed-off-by: Paul Schultz <pschultz@pobox.com>
This commit is contained in:
@@ -65,13 +65,18 @@ const globalEvents = getOrCreateGlobalSingleton<TempGlobalEvents>(
|
||||
export const routableExtensionRenderedEvent = '_ROUTABLE-EXTENSION-RENDERED';
|
||||
|
||||
export class Tracker implements AnalyticsTracker {
|
||||
private readonly analyticsApi: AnalyticsApi;
|
||||
private context: AnalyticsContextValue;
|
||||
|
||||
constructor(
|
||||
private readonly analyticsApi: AnalyticsApi,
|
||||
private context: AnalyticsContextValue = {
|
||||
analyticsApi: AnalyticsApi,
|
||||
context: AnalyticsContextValue = {
|
||||
pluginId: 'root',
|
||||
extensionId: 'App',
|
||||
},
|
||||
) {
|
||||
this.analyticsApi = analyticsApi;
|
||||
this.context = context;
|
||||
// Only register a single beforeunload event across all trackers.
|
||||
if (!globalEvents.beforeUnloadRegistered) {
|
||||
// Before the page unloads, attempt to capture any deferred navigation
|
||||
|
||||
@@ -71,13 +71,17 @@ class ExternalRouteRefImpl
|
||||
implements InternalExternalRouteRef
|
||||
{
|
||||
readonly $$type = '@backstage/ExternalRouteRef' as any;
|
||||
readonly params: string[];
|
||||
readonly defaultTarget: string | undefined;
|
||||
|
||||
constructor(
|
||||
readonly params: string[] = [],
|
||||
readonly defaultTarget: string | undefined,
|
||||
params: string[] = [],
|
||||
defaultTarget: string | undefined,
|
||||
creationSite: string,
|
||||
) {
|
||||
super(params, creationSite);
|
||||
this.params = params;
|
||||
this.defaultTarget = defaultTarget;
|
||||
}
|
||||
|
||||
getDefaultTarget() {
|
||||
|
||||
Reference in New Issue
Block a user