File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
packages-exp/performance-exp/src Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,9 @@ export function initializePerformance(
70
70
throw ERROR_FACTORY . create ( ErrorCode . ALREADY_INITIALIZED ) ;
71
71
}
72
72
73
- const perfInstance = provider . getImmediate ( ) as PerformanceController ;
74
- perfInstance . _init ( settings ) ;
73
+ const perfInstance = provider . initialize ( {
74
+ options : settings
75
+ } ) as PerformanceController ;
75
76
return perfInstance ;
76
77
}
77
78
@@ -89,7 +90,8 @@ export function trace(
89
90
}
90
91
91
92
const factory : InstanceFactory < 'performance-exp' > = (
92
- container : ComponentContainer
93
+ container : ComponentContainer ,
94
+ { options : settings } : { options ?: PerformanceSettings }
93
95
) => {
94
96
// Dependencies
95
97
const app = container . getProvider ( 'app-exp' ) . getImmediate ( ) ;
@@ -104,7 +106,10 @@ const factory: InstanceFactory<'performance-exp'> = (
104
106
throw ERROR_FACTORY . create ( ErrorCode . NO_WINDOW ) ;
105
107
}
106
108
setupApi ( window ) ;
107
- return new PerformanceController ( app , installations ) ;
109
+ const perfInstance = new PerformanceController ( app , installations ) ;
110
+ perfInstance . _init ( settings ) ;
111
+
112
+ return perfInstance ;
108
113
} ;
109
114
110
115
function registerPerformance ( ) : void {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export const enum ComponentType {
38
38
39
39
export interface InstanceFactoryOptions {
40
40
instanceIdentifier ?: string ;
41
- options ?: Record < string , unknown > ;
41
+ options ?: { } ;
42
42
}
43
43
44
44
export type InitializeOptions = InstanceFactoryOptions ;
You can’t perform that action at this time.
0 commit comments