Skip to content

Commit 5fd7541

Browse files
MeAkibalxhub
authored andcommitted
refactor(core): use proper type for stringifyTypeFromDebugify parameter
Replace the 'any' type with ClassDebugInfo for the debugInfo parameter in stringifyTypeFromDebugInfo function. This removes the TODO comment that was tracking the need for proper typing without creating circular dependencies. The change improves type safety while avoiding circular imports since stringify_utils.ts doesn't export anything that definition.ts imports.
1 parent aa92f19 commit 5fd7541

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/core/src/render3/util/stringify_utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import {Type} from '../../interface/type';
1010
import {getComponentDef} from '../def_getters';
11+
import type {ClassDebugInfo} from '../interfaces/definition';
1112

1213
/**
1314
* Used for stringify render output in Ivy.
@@ -54,9 +55,7 @@ export function debugStringifyTypeForError(type: Type<any>): string {
5455
return stringifyForError(type);
5556
}
5657

57-
// TODO(pmvald): Do some refactoring so that we can use the type ClassDebugInfo for the param
58-
// debugInfo here without creating circular deps.
59-
function stringifyTypeFromDebugInfo(debugInfo: any): string {
58+
function stringifyTypeFromDebugInfo(debugInfo: ClassDebugInfo): string {
6059
if (!debugInfo.filePath || !debugInfo.lineNumber) {
6160
return debugInfo.className;
6261
} else {

0 commit comments

Comments
 (0)