From d18a77b05cde765105a654d0da99cecc4833c743 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 16 Jan 2026 15:26:59 -0500 Subject: [PATCH 1/2] test(@angular-devkit/schematics): add explicit return types for isolated declarations This commit adds explicit return types to schematic factory functions in the test suite to satisfy the `isolatedDeclarations` requirement. --- .../tools/file-system-engine-host/extra-properties/factory.ts | 2 +- .../tools/file-system-engine-host/file-tasks/factory.ts | 2 +- .../schematics/tools/file-system-engine-host/null-factory.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/angular_devkit/schematics/tools/file-system-engine-host/extra-properties/factory.ts b/tests/angular_devkit/schematics/tools/file-system-engine-host/extra-properties/factory.ts index a238c3265089..813e23f50981 100644 --- a/tests/angular_devkit/schematics/tools/file-system-engine-host/extra-properties/factory.ts +++ b/tests/angular_devkit/schematics/tools/file-system-engine-host/extra-properties/factory.ts @@ -10,7 +10,7 @@ import { SchematicContext, Tree } from '@angular-devkit/schematics'; export default function (options: {}) { - return (tree: Tree, context: SchematicContext) => { + return (tree: Tree, context: SchematicContext): void => { // We pass information back to the test. tree.create( (context.schematic.description as any).extra, // tslint:disable-line:no-any diff --git a/tests/angular_devkit/schematics/tools/file-system-engine-host/file-tasks/factory.ts b/tests/angular_devkit/schematics/tools/file-system-engine-host/file-tasks/factory.ts index adb52eb0465e..354eba9f98cf 100644 --- a/tests/angular_devkit/schematics/tools/file-system-engine-host/file-tasks/factory.ts +++ b/tests/angular_devkit/schematics/tools/file-system-engine-host/file-tasks/factory.ts @@ -10,7 +10,7 @@ import { SchematicContext, Tree } from '@angular-devkit/schematics'; export default function () { - return (_: Tree, context: SchematicContext) => { + return (_: Tree, context: SchematicContext): void => { context.addTask({ toConfiguration() { return { name: 'file-tasks/file-task.js' }; diff --git a/tests/angular_devkit/schematics/tools/file-system-engine-host/null-factory.ts b/tests/angular_devkit/schematics/tools/file-system-engine-host/null-factory.ts index 2a1815478552..b8c081f1a12c 100644 --- a/tests/angular_devkit/schematics/tools/file-system-engine-host/null-factory.ts +++ b/tests/angular_devkit/schematics/tools/file-system-engine-host/null-factory.ts @@ -6,5 +6,5 @@ * found in the LICENSE file at https://angular.dev/license */ export default function () { - return () => {}; + return (): void => {}; } From bb2bea65615fe6e74525fad6ad7145c59b1ec833 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 16 Jan 2026 15:28:17 -0500 Subject: [PATCH 2/2] refactor(@angular/ssr): support building with `isolatedDeclarations` This commit adds explicit return types and parameter types to the `@angular/ssr` package to satisfy the `isolatedDeclarations` compiler option. --- packages/angular/ssr/node/src/common-engine/common-engine.ts | 2 +- packages/angular/ssr/src/utils/redirect.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular/ssr/node/src/common-engine/common-engine.ts b/packages/angular/ssr/node/src/common-engine/common-engine.ts index 079c1187696b..673156ee6b43 100644 --- a/packages/angular/ssr/node/src/common-engine/common-engine.ts +++ b/packages/angular/ssr/node/src/common-engine/common-engine.ts @@ -65,7 +65,7 @@ export class CommonEngine { private readonly inlineCriticalCssProcessor = new CommonEngineInlineCriticalCssProcessor(); private readonly pageIsSSG = new Map(); - constructor(private options?: CommonEngineOptions) { + constructor(private options?: CommonEngineOptions | undefined) { attachNodeGlobalErrorHandlers(); } diff --git a/packages/angular/ssr/src/utils/redirect.ts b/packages/angular/ssr/src/utils/redirect.ts index 7a65ff472a2a..18ca3f92b819 100644 --- a/packages/angular/ssr/src/utils/redirect.ts +++ b/packages/angular/ssr/src/utils/redirect.ts @@ -9,7 +9,7 @@ /** * An set of HTTP status codes that are considered valid for redirect responses. */ -export const VALID_REDIRECT_RESPONSE_CODES = new Set([301, 302, 303, 307, 308]); +export const VALID_REDIRECT_RESPONSE_CODES: Set = new Set([301, 302, 303, 307, 308]); /** * Checks if the given HTTP status code is a valid redirect response code.