diff --git a/packages/angular/cli/src/command-builder/utilities/schematic-workflow.ts b/packages/angular/cli/src/command-builder/utilities/schematic-workflow.ts index c4134ef8ce66..8830454356ea 100644 --- a/packages/angular/cli/src/command-builder/utilities/schematic-workflow.ts +++ b/packages/angular/cli/src/command-builder/utilities/schematic-workflow.ts @@ -38,17 +38,11 @@ export function subscribeToWorkflow( ); break; case 'update': - logs.push( - // TODO: `as unknown` was necessary during TS 5.9 update. Figure out a long-term solution. - `${colors.cyan('UPDATE')} ${eventPath} (${(event.content as unknown as Buffer).length} bytes)`, - ); + logs.push(`${colors.cyan('UPDATE')} ${eventPath} (${event.content.byteLength} bytes)`); files.add(eventPath); break; case 'create': - logs.push( - // TODO: `as unknown` was necessary during TS 5.9 update. Figure out a long-term solution. - `${colors.green('CREATE')} ${eventPath} (${(event.content as unknown as Buffer).length} bytes)`, - ); + logs.push(`${colors.green('CREATE')} ${eventPath} (${event.content.byteLength} bytes)`); files.add(eventPath); break; case 'delete': diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index 91a658d0ced8..f07e6a93e5ab 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -335,14 +335,12 @@ export async function main({ break; case 'update': loggingQueue.push( - // TODO: `as unknown` was necessary during TS 5.9 update. Figure out a long-term solution. - `${styleText(['cyan'], 'UPDATE')} ${eventPath} (${(event.content as unknown as Buffer).length} bytes)`, + `${styleText(['cyan'], 'UPDATE')} ${eventPath} (${event.content.byteLength} bytes)`, ); break; case 'create': loggingQueue.push( - // TODO: `as unknown` was necessary during TS 5.9 update. Figure out a long-term solution. - `${styleText(['green'], 'CREATE')} ${eventPath} (${(event.content as unknown as Buffer).length} bytes)`, + `${styleText(['green'], 'CREATE')} ${eventPath} (${event.content.byteLength} bytes)`, ); break; case 'delete':