angular/packages/core/testing/src/logger.ts
Andrew Kushnir e5cc624b87 refactor(core): convert scripts within packages/core/testing to relative imports (#60232)
This commit updates scripts within `packages/core/testing` to relative imports as a prep work to the upcoming infra updates.

PR Close #60232
2025-03-27 18:29:35 +00:00

36 lines
610 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Injectable} from '../../src/core';
@Injectable()
export class Log<T = string> {
logItems: T[];
constructor() {
this.logItems = [];
}
add(value: T): void {
this.logItems.push(value);
}
fn(value: T) {
return () => {
this.logItems.push(value);
};
}
clear(): void {
this.logItems = [];
}
result(): string {
return this.logItems.join('; ');
}
}