Skip to content

Commit 412ac30

Browse files
AndrewKushnirkirjs
authored andcommitted
Revert "refactor(core): profiler takes null as a default instance (angular#59233)" (angular#59506)
This reverts commit c4ad8fb. PR Close angular#59506
1 parent e77df14 commit 412ac30

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

devtools/projects/ng-devtools-backend/src/lib/hooks/profiler/native.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class NgProfiler extends Profiler {
4343

4444
private _initialize(): void {
4545
ngDebugClient().ɵsetProfiler(
46-
(event: ɵProfilerEvent, instanceOrLView: {} | null = null, hookOrListener: any) =>
46+
(event: ɵProfilerEvent, instanceOrLView: {} | null, hookOrListener: any) =>
4747
this._callbacks.forEach((cb) => cb(event, instanceOrLView, hookOrListener)),
4848
);
4949
}

packages/core/src/render3/profiler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const setProfiler = (profiler: Profiler | null) => {
3333
* execution context
3434
* @returns
3535
*/
36-
export const profiler: Profiler = function (event, instance = null, hookOrListener) {
36+
export const profiler: Profiler = function (event, instance, hookOrListener) {
3737
if (profilerCallback != null /* both `null` and `undefined` */) {
3838
profilerCallback(event, instance, hookOrListener);
3939
}

packages/core/src/render3/profiler_types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,5 @@ export const enum ProfilerEvent {
160160
* Profiler function which the runtime will invoke before and after user code.
161161
*/
162162
export interface Profiler {
163-
(event: ProfilerEvent, instance?: {} | null, hookOrListener?: (e?: any) => any): void;
163+
(event: ProfilerEvent, instance: {} | null, hookOrListener?: (e?: any) => any): void;
164164
}

0 commit comments

Comments
 (0)