Skip to content

Commit

Permalink
refactor(core): remove unused attachDebugObject function (#48549)
Browse files Browse the repository at this point in the history
This commit removes the unused attachDebugObject function.

PR Close #48549
  • Loading branch information
pkozlowski-opensource authored and alxhub committed Jan 4, 2023
1 parent 2fb6df2 commit 1085e5c
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions packages/core/src/render3/util/debug_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/

/**
* Patch a `debug` property on top of the existing object.
*
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
*
* @param obj Object to patch
* @param debug Value to patch
*/
export function attachDebugObject(obj: any, debug: any): void {
if (ngDevMode) {
Object.defineProperty(obj, 'debug', {value: debug, enumerable: false});
} else {
throw new Error(
'This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
}
}

/**
* Patch a `debug` property getter on top of the existing object.
*
Expand Down

0 comments on commit 1085e5c

Please sign in to comment.