Skip to content

Conversation

@cexbrayat
Copy link
Member

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Recently, the Angular team said on a panel that isolatedDeclarations can make a huge difference in build times, but we currently can't test it in the CLI.

Angular CLI forcefully set both declaration and composite to false, which prevents the use of isolatedDeclarations as TypeScript requires at least one of these options to be true when isolatedDeclarations is set (TS5069 error):

✘ [ERROR] TS5069: Option 'isolatedDeclarations' cannot be specified without specifying option 'declaration' or option 'composite'. [plugin angular-compiler]

What is the new behavior?

This change allows the use of TypeScript's isolatedDeclarations compiler option by conditionally preserving the declaration and composite options when isolatedDeclarations is enabled.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This change allows the use of TypeScript's isolatedDeclarations compiler
option by conditionally preserving the declaration and composite options
when isolatedDeclarations is enabled.

Previously, the Angular CLI forcefully set both declaration and composite
to false, which prevented the use of isolatedDeclarations as TypeScript
requires at least one of these options to be true when isolatedDeclarations
is set (TS5069 error):

```
✘ [ERROR] TS5069: Option 'isolatedDeclarations' cannot be specified without specifying option 'declaration' or option 'composite'. [plugin angular-compiler]
```
@cexbrayat cexbrayat force-pushed the fix/isolated-declarations branch from 143e651 to 1d95ebf Compare January 22, 2026 16:37
@cexbrayat
Copy link
Member Author

cexbrayat commented Jan 22, 2026

@clydin @alan-agius4 In your opinion, can isolatedDeclarations speed up builds with the CLI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant