Skip to content

refactor(@angular-devkit/core): additional isolated declarations cleanup #30208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Apr 30, 2025

To eventually support the use of the TypeScript isolatedDeclarations option, additional type adjustments have been made to code within the @angular-devkit/core package. While this is not yet comprehensive, it significantly reduces the amount of build errors with the isolatedDeclarations option enabled.

@clydin clydin added the target: major This PR is targeted for the next major release label Apr 30, 2025
}

export class SimpleMemoryHost implements Host<{}> {
protected _cache = new Map<Path, Stats<SimpleMemoryHostStats>>();
protected _cache: Map<Path, Stats<SimpleMemoryHostStats>> = new Map();
private _watchers = new Map<Path, [HostWatchOptions, Subject<HostWatchEvent>][]>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this wasn't updated because it's private and won't show up in typings? Should we favor style consistency over the strict requirements (no strong preference either way, just wondering)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, since that is private it's not an issue from an isolated declarations perspective.
Good question, though. For this PR, I went through each error and fixed individually. Since that was not an error, it was not modified. In general, I do favor consistency. However, we would probably need some form of lint check to both catch all these cases and prevent backsliding. This may be a good followup task.

To eventually support the use of the TypeScript `isolatedDeclarations`
option, additional type adjustments have been made to code within the
`@angular-devkit/core` package. While this is not yet comprehensive, it
significantly reduces the amount of build errors with the `isolatedDeclarations`
option enabled.
@clydin clydin force-pushed the build/isolated-decl-cleanup-3 branch from dbbe8c9 to 876ae1b Compare April 30, 2025 14:42
@clydin clydin added the action: merge The PR is ready for merge by the caretaker label Apr 30, 2025
@clydin clydin merged commit 23124c5 into angular:main Apr 30, 2025
31 checks passed
@clydin clydin deleted the build/isolated-decl-cleanup-3 branch April 30, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: @angular-devkit/core target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants