pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/angular/angular/pull/68722

ets/global-10539fe0effdbc74.css" /> Isolated declarations #2 by alxhub · Pull Request #68722 · angular/angular · GitHub
Skip to content

Isolated declarations #2#68722

Draft
alxhub wants to merge 3 commits into
angular:mainfrom
alxhub:iso-decl-2
Draft

Isolated declarations #2#68722
alxhub wants to merge 3 commits into
angular:mainfrom
alxhub:iso-decl-2

Conversation

@alxhub
Copy link
Copy Markdown
Member

@alxhub alxhub commented May 13, 2026

Second round of changes related to isolatedDeclarations in g3.

alxhub added 3 commits May 12, 2026 16:22
…dDeclarations

This commit adds support for compiling NgModules in isolated declarations mode.

Key changes:
- Removed the unnecessary @NgModule({id}) warning diagnostic in isolated declarations mode.
- Set declarations to never in the generated .d.ts file for isolated NgModules.
- Extracted closures to standalone functions in NgModuleDecoratorHandler to avoid capturing state.
- Removed bootstrap and declarations from R3NgModuleMetadataIsolated as they are not used or always never.
- Extended the foreign function mechanism in PartialEvaluator to handle foreign types like ModuleWithProviders.
- Converted declaration-only compliance tests to use explicit goldens (*_isolated.golden.d.ts) and updated behavioral tests.

These changes are internal refactorings to support isolated declarations and are not relevant to 3rd party Angular users.
…larations

Removes restrictions around using external references and local directives in `hostDirectives` under isolated declarations mode (`emitDeclarationOnly: true`).

By wrapping the host directive reference in a `WrappedNodeExpr`, TypeScript's declaration emitter seamlessly emits `typeof hostReference.node`, preserving existing imports or local identifiers exactly as authored. Also adds support for translating `PropertyAccessExpression` inside `WrappedNodeExpr` into `QualifiedName` for `.d.ts` emission, ensuring namespace imports (`import * as n from './dir'`) are preserved correctly.
…eclarations

Adds support for `@Input` transform functions in isolated declarations mode (`emitDeclarationOnly: true`), allowing components and directives to specify `transform` functions without triggering fatal compiler errors.

Synthesizes the `ngAcceptInputType_` write type syntactically:
- For referenced functions (`transform: booleanAttribute`), emits `Parameters<typeof booleanAttribute>[0]`, relying on downstream template type checking to resolve the type.
- For inline functions (`transform: (v: string) => boolean`), extracts `parameters[0].type` directly from the local TypeScript AST.
@angular-robot angular-robot Bot added the area: compiler Issues related to `ngc`, Angular's template compiler label May 13, 2026
@ngbot ngbot Bot added this to the Backlog milestone May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: compiler Issues related to `ngc`, Angular's template compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy