refactor(compiler): add support for compiling NgModules under isolatedDeclarations
Some checks failed
DevInfra / assistant_to_the_branch_manager (push) Has been cancelled
CI (push) / test (push) Has been cancelled
CI (push) / integration-tests (push) Has been cancelled
CI (push) / publish-snapshots (push) Has been cancelled
CI (push) / zone-js (push) Has been cancelled
CI (push) / lint (push) Has been cancelled
CI (push) / devtools (push) Has been cancelled
CI (push) / adev (push) Has been cancelled
CI (push) / vscode-ng-language-service (push) Has been cancelled
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Has been cancelled
Performance Tracking / list (push) Has been cancelled
OpenSSF Scorecard / Scorecards analysis (push) Has been cancelled
CI (push) / adev-deploy (push) Has been cancelled
Performance Tracking / workflow (push) Has been cancelled

This commit adds support for compiling NgModules in isolated declarations mode.
This commit is contained in:
Alex Rickabaugh 2026-05-22 14:00:18 -07:00 committed by GitHub
parent df68a96b26
commit 06b004ec5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
613 changed files with 7756 additions and 85 deletions

View file

@ -31,6 +31,7 @@ import {
ReturnStatement,
SchemaMetadata,
Statement,
TypeofExpr,
WrappedNodeExpr,
} from '@angular/compiler';
import ts from 'typescript';
@ -45,6 +46,7 @@ import {
assertSuccessfulReferenceEmit,
LocalCompilationExtraImportsTracker,
Reference,
ReferenceEmitKind,
ReferenceEmitter,
} from '../../../imports';
import {
@ -104,6 +106,7 @@ import {
ReferencesRegistry,
resolveProvidersRequiringFactory,
toR3Reference,
tryUnwrapForwardRef,
unwrapExpression,
wrapFunctionExpressionsInParens,
wrapTypeReference,
@ -352,14 +355,21 @@ export class NgModuleDecoratorHandler implements DecoratorHandler<
return {};
}
// In declaration-only emission the `declarations`/`imports`/`exports` arrays are emitted via a
// purely syntactic transform - we don't attempt static resolution at all (that machinery is
// only needed for the regular emit path) and produce the `Isolated` metadata kind directly
// from the raw decorator expressions.
if (this.emitDeclarationOnly) {
return this.analyzeForDeclarationOnly(node, name, ngModule, decorator);
}
const forwardRefResolver = createForwardRefResolver(this.isCore);
const moduleResolvers = combineResolvers([
createModuleWithProvidersResolver(this.reflector, this.isCore),
forwardRefResolver,
]);
const allowUnresolvedReferences =
this.compilationMode === CompilationMode.LOCAL && !this.emitDeclarationOnly;
const allowUnresolvedReferences = this.compilationMode === CompilationMode.LOCAL;
const diagnostics: ts.Diagnostic[] = [];
// Resolving declarations
@ -552,6 +562,7 @@ export class NgModuleDecoratorHandler implements DecoratorHandler<
const type = wrapTypeReference(node);
let ngModuleMetadata: R3NgModuleMetadata;
if (allowUnresolvedReferences) {
ngModuleMetadata = {
kind: R3NgModuleMetadataKind.Local,
@ -1093,6 +1104,116 @@ export class NgModuleDecoratorHandler implements DecoratorHandler<
}
}
/**
* Analyze path used in `emitDeclarationOnly` (isolated declarations) mode. The
* `declarations`/`imports`/`exports` arrays are NOT statically resolved here - they're transformed
* syntactically into the `Isolated` metadata kind's type-tuple expressions, which downstream
* `.d.ts` metadata readers resolve. This skips the partial-evaluator path entirely.
*/
private analyzeForDeclarationOnly(
node: ClassDeclaration,
name: string,
ngModule: Map<string, ts.Expression>,
decorator: Readonly<Decorator>,
): AnalysisOutput<NgModuleAnalysis> {
const diagnostics: ts.Diagnostic[] = [];
const rawDeclarations = ngModule.get('declarations') ?? null;
const rawImports = ngModule.get('imports') ?? null;
const rawExports = ngModule.get('exports') ?? null;
const rawProviders = ngModule.get('providers') ?? null;
let id: Expression | null = null;
if (ngModule.has('id')) {
const idExpr = ngModule.get('id')!;
if (!isModuleIdExpression(idExpr)) {
id = new WrappedNodeExpr(idExpr);
}
}
const type = wrapTypeReference(node);
const ngModuleMetadata: R3NgModuleMetadata = {
kind: R3NgModuleMetadataKind.Isolated,
type,
importsExpression: rawImports
? transformToTypeTupleExpression(
rawImports,
this.evaluator,
this.refEmitter,
node.getSourceFile(),
this.reflector,
diagnostics,
)
: null,
exportsExpression: rawExports
? transformToTypeTupleExpression(
rawExports,
this.evaluator,
this.refEmitter,
node.getSourceFile(),
this.reflector,
diagnostics,
)
: null,
id,
selectorScopeMode: R3SelectorScopeMode.Omit,
schemas: [],
};
// Providers are emitted as-is - they are needed for the injector but don't go through any
// resolution at this stage.
let wrappedProviders: WrappedNodeExpr<ts.Expression> | null = null;
if (
rawProviders !== null &&
(!ts.isArrayLiteralExpression(rawProviders) || rawProviders.elements.length > 0)
) {
wrappedProviders = new WrappedNodeExpr(
this.annotateForClosureCompiler
? wrapFunctionExpressionsInParens(rawProviders)
: rawProviders,
);
}
const injectorMetadata: R3InjectorMetadata = {
name,
type,
providers: wrappedProviders,
imports: [],
};
const factoryMetadata: R3FactoryMetadata = {
name,
type,
typeArgumentCount: 0,
deps: getValidConstructorDependencies(node, this.reflector, this.isCore),
target: FactoryTarget.NgModule,
};
return {
diagnostics: diagnostics.length > 0 ? diagnostics : undefined,
analysis: {
id,
schemas: [],
mod: ngModuleMetadata,
inj: injectorMetadata,
fac: factoryMetadata,
declarations: [],
rawDeclarations,
imports: [],
rawImports,
importRefs: [],
exports: [],
rawExports,
providers: rawProviders,
providersRequiringFactory: null,
classMetadata: null,
factorySymbolName: node.name.text,
remoteScopesMayRequireCycleProtection: false,
decorator: (decorator?.node as ts.Decorator | null) ?? null,
},
};
}
// Verify that a "Declaration" reference is a `ClassDeclaration` reference.
private isClassDeclarationReference(ref: Reference): ref is Reference<ClassDeclaration> {
return this.reflector.isClass(ref.node);
@ -1176,17 +1297,6 @@ export class NgModuleDecoratorHandler implements DecoratorHandler<
} else if (entry instanceof DynamicValue && allowUnresolvedReferences) {
dynamicValueSet.add(entry);
continue;
} else if (
this.emitDeclarationOnly &&
entry instanceof DynamicValue &&
entry.isFromUnknownIdentifier()
) {
throw createValueHasWrongTypeError(
entry.node,
entry,
`Value at position ${absoluteIndex} in the NgModule.${arrayName} of ${className} is an external reference. ` +
'External references in @NgModule declarations are not supported in experimental declaration-only emission mode',
);
} else {
// TODO(alxhub): Produce a better diagnostic here - the array index may be an inner array.
throw createValueHasWrongTypeError(
@ -1257,3 +1367,132 @@ function makeStandaloneBootstrapDiagnostic(
function isSyntheticReference(ref: Reference<DeclarationNode>): boolean {
return ref.synthetic;
}
/**
* Converts a value expression that is an identifier or a chain of property accesses on identifiers
* (e.g. `Foo` or `Foo.bar`) into the equivalent `ts.EntityName`, reusing the original identifier
* nodes so that any imports they reference are preserved by TypeScript's declaration emitter.
* Returns `null` for any other shape of expression.
*/
function expressionToEntityName(expr: ts.Expression): ts.EntityName | null {
if (ts.isIdentifier(expr)) {
return expr;
}
if (ts.isPropertyAccessExpression(expr) && ts.isIdentifier(expr.name)) {
const left = expressionToEntityName(expr.expression);
return left === null ? null : ts.factory.createQualifiedName(left, expr.name);
}
return null;
}
function transformToTypeTupleElement(
el: ts.Expression,
reflector: ReflectionHost,
diagnostics: ts.Diagnostic[],
): Expression {
let current = unwrapExpression(el);
while (true) {
const unwrapped = tryUnwrapForwardRef(current, reflector);
if (unwrapped === null) {
break;
}
current = unwrapExpression(unwrapped);
}
el = current;
// A call expression (e.g. `Foo.forRoot()` or a bare `fn()`) cannot be referenced with a
// `typeof` query directly. Instead emit `ReturnType<typeof callee>` so that the `.d.ts`
// reader can resolve the (potentially `ModuleWithProviders<T>`) return type later.
if (ts.isCallExpression(el)) {
const callee = expressionToEntityName(el.expression);
if (callee !== null) {
return new WrappedNodeExpr(
ts.factory.createTypeReferenceNode(ts.factory.createIdentifier('ReturnType'), [
ts.factory.createTypeQueryNode(callee),
]),
);
}
}
if (expressionToEntityName(el) === null) {
const diag = makeDiagnostic(
ErrorCode.LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION,
el,
`In experimental declaration-only emission mode, this expression is not supported in NgModule imports/exports as it cannot be referenced with 'typeof'. Use a direct reference or a supported call.`,
);
diagnostics.push(diag);
return new WrappedNodeExpr(ts.factory.createKeywordTypeNode(ts.SyntaxKind.NeverKeyword));
}
return new TypeofExpr(new WrappedNodeExpr(el));
}
function resolvedToTypeTupleElement(
originalEl: ts.Expression,
resolved: ResolvedValue,
refEmitter: ReferenceEmitter,
sourceFile: ts.SourceFile,
reflector: ReflectionHost,
diagnostics: ts.Diagnostic[],
): Expression {
if (resolved instanceof Reference) {
const emitted = refEmitter.emit(resolved, sourceFile);
if (emitted.kind === ReferenceEmitKind.Success) {
return new TypeofExpr(emitted.expression);
}
}
if (Array.isArray(resolved)) {
const elements: Expression[] = [];
let allValid = true;
for (const item of resolved) {
if (item instanceof Reference) {
const emitted = refEmitter.emit(item, sourceFile);
if (emitted.kind === ReferenceEmitKind.Success) {
elements.push(new TypeofExpr(emitted.expression));
continue;
}
}
allValid = false;
break;
}
if (allValid && elements.length > 0) {
return new LiteralArrayExpr(elements);
}
}
// Fallback to syntactic transform
return transformToTypeTupleElement(originalEl, reflector, diagnostics);
}
function transformToTypeTupleExpression(
expr: ts.Expression,
evaluator: PartialEvaluator,
refEmitter: ReferenceEmitter,
sourceFile: ts.SourceFile,
reflector: ReflectionHost,
diagnostics: ts.Diagnostic[],
): Expression | null {
if (ts.isArrayLiteralExpression(expr)) {
// An empty array is treated like an omitted slot (emitted as `never` by
// `createNgModuleType`), matching the standard compilation path.
if (expr.elements.length === 0) {
return null;
}
return new LiteralArrayExpr(
expr.elements.map((el) => {
const resolved = evaluator.evaluate(el);
return resolvedToTypeTupleElement(
el,
resolved,
refEmitter,
sourceFile,
reflector,
diagnostics,
);
}),
);
}
const resolved = evaluator.evaluate(expr);
return resolvedToTypeTupleElement(expr, resolved, refEmitter, sourceFile, reflector, diagnostics);
}

View file

@ -12,6 +12,7 @@ ts_project(
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/file_system",
"//packages/compiler-cli/src/ngtsc/imports",
"//packages/compiler-cli/src/ngtsc/partial_evaluator",
"//packages/compiler-cli/src/ngtsc/reflection",
"//packages/compiler-cli/src/ngtsc/util",
],

View file

@ -10,6 +10,7 @@ import {ClassPropertyMapping, MatchSource} from '@angular/compiler';
import ts from 'typescript';
import {OwningModule, Reference} from '../../imports';
import {ForeignTypeResolver, PartialEvaluator, ResolvedValue} from '../../partial_evaluator/index';
import {
ClassDeclaration,
isNamedClassDeclaration,
@ -29,7 +30,6 @@ import {
} from './api';
import {
extractDirectiveTypeCheckMeta,
extractReferencesFromType,
extraReferenceFromTypeQuery,
readBooleanType,
readMapType,
@ -42,10 +42,14 @@ import {
* from an upstream compilation already.
*/
export class DtsMetadataReader implements MetadataReader {
private evaluator: PartialEvaluator;
constructor(
private checker: ts.TypeChecker,
private reflector: ReflectionHost,
) {}
) {
this.evaluator = new PartialEvaluator(this.reflector, this.checker, null);
}
/**
* Read the metadata from a class that has already been compiled somehow (either it's in a .d.ts
@ -76,21 +80,26 @@ export class DtsMetadataReader implements MetadataReader {
// Read the ModuleData out of the type arguments.
const [_, declarationMetadata, importMetadata, exportMetadata] = ngModuleDef.type.typeArguments;
const declarations = extractReferencesFromType(
this.checker,
declarationMetadata,
ref.bestGuessOwningModule,
);
const exports = extractReferencesFromType(
this.checker,
exportMetadata,
ref.bestGuessOwningModule,
);
const imports = extractReferencesFromType(
this.checker,
importMetadata,
ref.bestGuessOwningModule,
const foreignTypeResolver: ForeignTypeResolver = (typeNode: ts.TypeNode) => {
return moduleWithProvidersTypeArgument(typeNode, this.reflector);
};
const evaluateMetadata = (metadataNode: ts.TypeNode) => {
return metadataNode.kind === ts.SyntaxKind.NeverKeyword
? []
: this.evaluator.evaluateType(
metadataNode,
ref.bestGuessOwningModule,
undefined,
foreignTypeResolver,
);
};
const declarations = this.extractReferencesFromResolvedValue(
evaluateMetadata(declarationMetadata),
);
const exports = this.extractReferencesFromResolvedValue(evaluateMetadata(exportMetadata));
const imports = this.extractReferencesFromResolvedValue(evaluateMetadata(importMetadata));
// The module is considered poisoned if it's exports couldn't be
// resolved completely. This would make the module not necessarily
@ -116,6 +125,30 @@ export class DtsMetadataReader implements MetadataReader {
};
}
private extractReferencesFromResolvedValue(value: ResolvedValue): {
result: Reference<ClassDeclaration>[];
isIncomplete: boolean;
} {
const result: Reference<ClassDeclaration>[] = [];
let isIncomplete = false;
if (Array.isArray(value)) {
for (const element of value) {
if (element instanceof Reference && this.reflector.isClass(element.node)) {
result.push(element as Reference<ClassDeclaration>);
} else {
isIncomplete = true;
}
}
} else if (value instanceof Reference && this.reflector.isClass(value.node)) {
result.push(value as Reference<ClassDeclaration>);
} else {
isIncomplete = true;
}
return {result, isIncomplete};
}
/**
* Read directive (or component) metadata from a referenced class in a .d.ts file.
*/
@ -397,3 +430,31 @@ function readHostDirectivesType(
return result.length > 0 ? {result, isIncomplete} : null;
}
/**
* If `type` is `ModuleWithProviders<T>` (resolving to the symbol exported by `@angular/core`, where
* determinable), returns the `T` type node; otherwise `null`.
*/
function moduleWithProvidersTypeArgument(
type: ts.TypeNode | undefined,
host: ReflectionHost,
): ts.TypeNode | null {
if (type === undefined || !ts.isTypeReferenceNode(type)) {
return null;
}
const name = ts.isQualifiedName(type.typeName) ? type.typeName.right : type.typeName;
if (name.text !== 'ModuleWithProviders') {
return null;
}
// If the reference can be traced to an import, require it to be from `@angular/core`. If it can't
// (e.g. a namespace-qualified `i0.ModuleWithProviders` or a local re-declaration in a `.d.ts`),
// fall back to trusting the name.
const imp = host.getImportOfIdentifier(name);
if (imp !== null && (imp.name !== 'ModuleWithProviders' || imp.from !== '@angular/core')) {
return null;
}
if (type.typeArguments === undefined || type.typeArguments.length !== 1) {
return null;
}
return type.typeArguments[0];
}

View file

@ -8,7 +8,7 @@
export {describeResolvedType, traceDynamicValue} from './src/diagnostics';
export {DynamicValue} from './src/dynamic';
export {ForeignFunctionResolver, PartialEvaluator} from './src/interface';
export {ForeignFunctionResolver, ForeignTypeResolver, PartialEvaluator} from './src/interface';
export {StaticInterpreter} from './src/interpreter';
export {
EnumValue,

View file

@ -8,7 +8,7 @@
import ts from 'typescript';
import {Reference} from '../../imports';
import {OwningModule, Reference} from '../../imports';
import {DependencyTracker} from '../../incremental/api';
import {ReflectionHost} from '../../reflection';
@ -23,6 +23,8 @@ export type ForeignFunctionResolver = (
unresolvable: DynamicValue,
) => ResolvedValue;
export type ForeignTypeResolver = (typeNode: ts.TypeNode) => ts.TypeNode | null;
export class PartialEvaluator {
constructor(
private host: ReflectionHost,
@ -41,4 +43,30 @@ export class PartialEvaluator {
foreignFunctionResolver,
});
}
/**
* Statically evaluates a `ts.TypeNode` (rather than a value expression) to a `ResolvedValue`.
*
* This is used when reading metadata that was encoded into `.d.ts` type positions - for example
* the `imports`/`exports`/`declarations` tuples of `ɵɵNgModuleDeclaration`, which may be written
* as `typeof X` queries, `ReturnType<typeof X.forRoot>`, references to constants that themselves
* resolve to tuples, etc.
*/
evaluateType(
typeNode: ts.TypeNode,
owningModule: OwningModule | null = null,
foreignFunctionResolver?: ForeignFunctionResolver,
foreignTypeResolver?: ForeignTypeResolver,
): ResolvedValue {
const interpreter = new StaticInterpreter(this.host, this.checker, this.dependencyTracker);
const sourceFile = typeNode.getSourceFile();
return interpreter.visitType(typeNode, {
originatingFile: sourceFile,
absoluteModuleName: owningModule ? owningModule.specifier : null,
resolutionContext: owningModule ? owningModule.resolutionContext : sourceFile.fileName,
scope: new Map<ts.ParameterDeclaration, ResolvedValue>(),
foreignFunctionResolver,
foreignTypeResolver,
});
}
}

View file

@ -16,7 +16,7 @@ import {isDeclaration} from '../../util/src/typescript';
import {ArrayConcatBuiltinFn, ArraySliceBuiltinFn, StringConcatBuiltinFn} from './builtin';
import {DynamicValue} from './dynamic';
import type {ForeignFunctionResolver} from './interface';
import type {ForeignFunctionResolver, ForeignTypeResolver} from './interface';
import {
EnumValue,
KnownFn,
@ -61,6 +61,7 @@ interface Context {
resolutionContext: string;
scope: Scope;
foreignFunctionResolver?: ForeignFunctionResolver;
foreignTypeResolver?: ForeignTypeResolver;
}
export class StaticInterpreter {
@ -707,7 +708,7 @@ export class StaticInterpreter {
return new Reference(node, owningModule(context));
}
private visitType(node: ts.TypeNode, context: Context): ResolvedValue {
public visitType(node: ts.TypeNode, context: Context): ResolvedValue {
if (ts.isLiteralTypeNode(node)) {
return this.visitExpression(node.literal, context);
} else if (ts.isTupleTypeNode(node)) {
@ -718,6 +719,10 @@ export class StaticInterpreter {
return this.visitType(node.type, context);
} else if (ts.isTypeQueryNode(node)) {
return this.visitTypeQuery(node, context);
} else if (ts.isTypeReferenceNode(node)) {
return this.visitTypeReference(node, context);
} else if (ts.isImportTypeNode(node)) {
return this.visitImportType(node, context);
}
return DynamicValue.fromDynamicType(node);
@ -747,6 +752,83 @@ export class StaticInterpreter {
const declContext: Context = {...context, ...joinModuleContext(context, node, decl)};
return this.visitDeclaration(decl.node, declContext);
}
private visitImportType(node: ts.ImportTypeNode, context: Context): ResolvedValue {
// `import("./module").Foo` - resolve `Foo` to its declaration, using the literal argument as
// the module specifier if the resolved declaration doesn't already carry one.
if (node.qualifier === undefined) {
return DynamicValue.fromDynamicType(node);
}
const name = ts.isQualifiedName(node.qualifier) ? node.qualifier.right : node.qualifier;
if (!ts.isIdentifier(name)) {
return DynamicValue.fromUnknown(node);
}
const decl = this.host.getDeclarationOfIdentifier(name);
if (decl === null) {
return DynamicValue.fromUnknownIdentifier(name);
}
let declContext: Context = {...context, ...joinModuleContext(context, node, decl)};
if (
declContext.absoluteModuleName === context.absoluteModuleName &&
ts.isLiteralTypeNode(node.argument) &&
ts.isStringLiteral(node.argument.literal) &&
!node.argument.literal.text.startsWith('.')
) {
declContext = {
...declContext,
absoluteModuleName: node.argument.literal.text,
resolutionContext: node.getSourceFile().fileName,
};
}
return this.visitDeclaration(decl.node, declContext);
}
private visitTypeReference(node: ts.TypeReferenceNode, context: Context): ResolvedValue {
const typeName = ts.isQualifiedName(node.typeName) ? node.typeName.right : node.typeName;
if (!ts.isIdentifier(typeName)) {
return DynamicValue.fromUnknown(node);
}
// `ReturnType<typeof someFn>` - resolve `someFn` and, if it returns `ModuleWithProviders<T>`,
// resolve to `T`. This is how the isolated-declarations transform encodes `imports`/`exports`
// entries that were call expressions (e.g. `FooModule.forRoot()` or a bare `provideFoo()`).
if (
typeName.text === 'ReturnType' &&
node.typeArguments !== undefined &&
node.typeArguments.length === 1
) {
const fn = this.visitType(node.typeArguments[0], context);
if (fn instanceof Reference) {
const decl = fn.node;
if (
ts.isFunctionDeclaration(decl) ||
ts.isMethodDeclaration(decl) ||
ts.isMethodSignature(decl)
) {
if (decl.type !== undefined && context.foreignTypeResolver !== undefined) {
const moduleType = context.foreignTypeResolver(decl.type);
if (moduleType !== null) {
return this.visitType(moduleType, context);
}
}
}
}
}
// A bare reference to a class - e.g. a hand-written `[FooModule]` tuple element, or the `T` of
// `ModuleWithProviders<T>`.
const decl = this.host.getDeclarationOfIdentifier(typeName);
if (decl !== null && this.host.isClass(decl.node)) {
return this.getReference(decl.node, {
...context,
...joinModuleContext(context, typeName, decl),
});
}
return DynamicValue.fromDynamicType(node);
}
}
function isFunctionOrMethodReference(

View file

@ -251,9 +251,14 @@ class TypeTranslatorVisitor implements o.ExpressionVisitor, o.TypeVisitor {
visitWrappedNodeExpr(ast: o.WrappedNodeExpr<any>, context: Context): ts.TypeNode {
const node: ts.Node = ast.node;
if (ts.isEntityName(node)) {
return ts.factory.createTypeReferenceNode(node);
return ts.factory.createTypeReferenceNode(this.routeEntityNameThroughImportManager(node));
} else if (ts.isTypeNode(node)) {
return node;
// The wrapped type node may reference identifiers from another source file (e.g. when the
// NgModule isolated-declarations transform synthesizes `ReturnType<typeof Foo.forRoot>`).
// Route the leftmost identifier of each entity name through the `ImportManager` so the
// emitted `.d.ts` carries the needed imports, namespaced consistently with what the standard
// (non-isolated) compilation path produces.
return this.routeEntityNamesInTypeNodeThroughImportManager(node);
} else if (ts.isLiteralExpression(node)) {
return ts.factory.createLiteralTypeNode(node);
} else if (ts.isTypeParameterDeclaration(node)) {
@ -265,6 +270,59 @@ class TypeTranslatorVisitor implements o.ExpressionVisitor, o.TypeVisitor {
}
}
/**
* If `name`'s leftmost identifier resolves to an import in the source file, replace it with a
* namespaced reference registered via the `ImportManager` (e.g. `Foo` `iN.Foo` + `import * as
* iN from './foo'` in the emitted file). Returns the entity name unchanged for local symbols or
* synthetic identifiers (e.g. the global `ReturnType`).
*/
private routeEntityNameThroughImportManager(name: ts.EntityName): ts.EntityName {
let leftmost: ts.EntityName = name;
while (ts.isQualifiedName(leftmost)) {
leftmost = leftmost.left;
}
if (!ts.isIdentifier(leftmost)) {
return name;
}
// Synthetic identifiers (with no parent) can't be resolved via `getImportOfIdentifier`, which
// relies on the parent chain - and shouldn't be rewritten anyway (e.g. the global `ReturnType`).
if (leftmost.parent === undefined) {
return name;
}
const imp = this.reflector.getImportOfIdentifier(leftmost);
if (imp === null) {
return name;
}
const namespaced = this.imports.addImport({
exportModuleSpecifier: imp.from,
exportSymbolName: imp.name,
requestedFile: this.contextFile,
asTypeReference: true,
});
return replaceLeftmostEntityName(name, namespaced);
}
private routeEntityNamesInTypeNodeThroughImportManager(typeNode: ts.TypeNode): ts.TypeNode {
const transformer: ts.TransformerFactory<ts.TypeNode> = (context) => {
const visit = (node: ts.Node): ts.Node => {
if (ts.isTypeReferenceNode(node)) {
const typeName = this.routeEntityNameThroughImportManager(node.typeName);
const typeArguments = node.typeArguments
? ts.visitNodes(node.typeArguments, visit, ts.isTypeNode)
: undefined;
return ts.factory.updateTypeReferenceNode(node, typeName, typeArguments);
}
if (ts.isTypeQueryNode(node)) {
const exprName = this.routeEntityNameThroughImportManager(node.exprName);
return ts.factory.updateTypeQueryNode(node, exprName, node.typeArguments);
}
return ts.visitEachChild(node, visit, context);
};
return (root) => ts.visitNode(root, visit, ts.isTypeNode) as ts.TypeNode;
};
return ts.transform(typeNode, [transformer]).transformed[0];
}
visitTypeofExpr(ast: o.TypeofExpr, context: Context): ts.TypeQueryNode {
const typeNode = this.translateExpression(ast.expr, context);
if (!ts.isTypeReferenceNode(typeNode)) {
@ -350,3 +408,18 @@ class TypeTranslatorVisitor implements o.ExpressionVisitor, o.TypeVisitor {
return typeNode;
}
}
/**
* Returns a new `ts.EntityName` with `name`'s leftmost identifier replaced by `newLeftmost`. For a
* single-identifier name this is just `newLeftmost`; for a qualified chain it preserves the `right`
* identifiers and re-builds the qualified name.
*/
function replaceLeftmostEntityName(name: ts.EntityName, newLeftmost: ts.EntityName): ts.EntityName {
if (ts.isIdentifier(name)) {
return newLeftmost;
}
return ts.factory.createQualifiedName(
replaceLeftmostEntityName(name.left, newLeftmost),
name.right,
);
}

View file

@ -5,6 +5,8 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import * as nodeFs from 'fs';
import * as path from 'path';
import {FileSystem} from '../../../src/ngtsc/file_system';
import {getReferenceFileForTypeDeclaration} from '../test_helpers/check_type_declarations';
import {CompileResult, compileTest} from '../test_helpers/compile_test';
@ -21,20 +23,7 @@ runTests('declaration-only emit', emitDeclarationOnlyTest, {emitDeclarationOnly:
* @param test The compliance test whose input files should be compiled.
*/
function emitDeclarationOnlyTest(fs: FileSystem, test: ComplianceTest): CompileResult {
const {emittedFiles} = compileTest(
fs,
test.inputFiles,
test.compilerOptions,
test.angularCompilerOptions,
);
const emittedTypeDeclarations = emittedFiles.filter((file) => file.endsWith('.d.ts'));
for (const emittedTypeDeclaration of emittedTypeDeclarations) {
fs.moveFile(
emittedTypeDeclaration,
getReferenceFileForTypeDeclaration(fs, emittedTypeDeclaration),
);
}
return compileTest(
const result = compileTest(
fs,
test.inputFiles,
{
@ -47,4 +36,23 @@ function emitDeclarationOnlyTest(fs: FileSystem, test: ComplianceTest): CompileR
_experimentalAllowEmitDeclarationOnly: true,
},
);
const {emittedFiles} = result;
const emittedTypeDeclarations = emittedFiles.filter((file) => file.endsWith('.d.ts'));
for (const emittedTypeDeclaration of emittedTypeDeclarations) {
const baseName = fs.basename(emittedTypeDeclaration, '.d.ts');
const goldenFileName = baseName + '_isolated.golden.d.ts';
const goldenPath = fs.resolve('/', goldenFileName);
if (fs.exists(goldenPath)) {
const goldenContent = fs.readFile(goldenPath);
const refPath = getReferenceFileForTypeDeclaration(fs, emittedTypeDeclaration);
fs.writeFile(refPath, goldenContent);
} else {
throw new Error(`Missing golden file for ${emittedTypeDeclaration} at ${goldenPath}`);
}
}
return result;
}

View file

@ -0,0 +1,15 @@
import { EventEmitter } from '@angular/core';
import * as i0 from "@angular/core";
export declare class TestDir {
counter: import("@angular/core").ModelSignal<number>;
modelWithAlias: import("@angular/core").ModelSignal<boolean>;
decoratorInput: boolean;
decoratorInputWithAlias: boolean;
decoratorOutput: EventEmitter<boolean>;
decoratorOutputWithAlias: EventEmitter<boolean>;
decoratorInputTwoWay: boolean;
decoratorInputTwoWayChange: EventEmitter<boolean>;
static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, { "counter": { "alias": "counter"; "required": false; "isSignal": true; }; "modelWithAlias": { "alias": "alias"; "required": false; "isSignal": true; }; "decoratorInput": { "alias": "decoratorInput"; "required": false; }; "decoratorInputWithAlias": { "alias": "publicNameDecorator"; "required": false; }; "decoratorInputTwoWay": { "alias": "decoratorInputTwoWay"; "required": false; }; }, { "counter": "counterChange"; "modelWithAlias": "aliasChange"; "decoratorOutput": "decoratorOutput"; "decoratorOutputWithAlias": "aliasDecoratorOutputWithAlias"; "decoratorInputTwoWayChange": "decoratorInputTwoWayChange"; }, never, never, true, never>;
}

View file

@ -0,0 +1,8 @@
import * as i0 from "@angular/core";
export declare class TestComp {
counter: import("@angular/core").ModelSignal<number>;
name: import("@angular/core").ModelSignal<string>;
static ɵfac: i0.ɵɵFactoryDeclaration<TestComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestComp, "ng-component", never, { "counter": { "alias": "counter"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": true; "isSignal": true; }; }, { "counter": "counterChange"; "name": "nameChange"; }, never, never, true, never>;
}

View file

@ -0,0 +1,8 @@
import * as i0 from "@angular/core";
export declare class TestDir {
counter: import("@angular/core").ModelSignal<number>;
name: import("@angular/core").ModelSignal<string>;
static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, { "counter": { "alias": "counter"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": true; "isSignal": true; }; }, { "counter": "counterChange"; "name": "nameChange"; }, never, never, true, never>;
}

View file

@ -0,0 +1,15 @@
import { EventEmitter } from '@angular/core';
import * as i0 from "@angular/core";
export declare class TestDir {
click1: import("@angular/core").OutputEmitterRef<void>;
click2: import("@angular/core").OutputEmitterRef<boolean>;
click3: import("@angular/core").OutputRef<unknown>;
_bla: import("@angular/core").OutputEmitterRef<void>;
_bla2: import("@angular/core").OutputRef<unknown>;
clickDecorator1: EventEmitter<any>;
clickDecorator2: EventEmitter<boolean>;
_blaDecorator: EventEmitter<void>;
static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, {}, { "click1": "click1"; "click2": "click2"; "click3": "click3"; "_bla": "decoratorPublicName"; "_bla2": "decoratorPublicName2"; "clickDecorator1": "clickDecorator1"; "clickDecorator2": "clickDecorator2"; "_blaDecorator": "decoratorPublicName3"; }, never, never, true, never>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class TestComp {
a: import("@angular/core").OutputEmitterRef<void>;
b: import("@angular/core").OutputEmitterRef<string>;
c: import("@angular/core").OutputEmitterRef<void>;
d: import("@angular/core").OutputRef<unknown>;
e: import("@angular/core").OutputRef<unknown>;
static ɵfac: i0.ɵɵFactoryDeclaration<TestComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestComp, "ng-component", never, {}, { "a": "a"; "b": "b"; "c": "cPublic"; "d": "d"; "e": "e"; }, never, never, true, never>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class TestDir {
a: import("@angular/core").OutputEmitterRef<void>;
b: import("@angular/core").OutputEmitterRef<string>;
c: import("@angular/core").OutputEmitterRef<void>;
d: import("@angular/core").OutputRef<unknown>;
e: import("@angular/core").OutputRef<unknown>;
static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, {}, { "a": "a"; "b": "b"; "c": "cPublic"; "d": "d"; "e": "e"; }, never, never, true, never>;
}

View file

@ -0,0 +1,4 @@
export declare function CustomClassDecorator(): ClassDecorator;
export declare function CustomPropDecorator(): PropertyDecorator;
export declare function CustomParamDecorator(): (target: Object, ...rest: any[]) => void;

View file

@ -0,0 +1,40 @@
import { InjectionToken } from '@angular/core';
import * as i0 from "@angular/core";
export declare const TOKEN: InjectionToken<string>;
declare class Service {
}
export declare class ParameterizedInjectable {
constructor(service: Service, token: string, custom: Service, mixed: string);
static ɵfac: i0.ɵɵFactoryDeclaration<ParameterizedInjectable, [null, null, null, { skipSelf: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<ParameterizedInjectable>;
}
export declare class NoCtor {
static ɵfac: i0.ɵɵFactoryDeclaration<NoCtor, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NoCtor>;
}
export declare class EmptyCtor {
constructor();
static ɵfac: i0.ɵɵFactoryDeclaration<EmptyCtor, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<EmptyCtor>;
}
export declare class NoDecorators {
constructor(service: Service);
static ɵfac: i0.ɵɵFactoryDeclaration<NoDecorators, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NoDecorators>;
}
export declare class CustomInjectable {
constructor(service: Service);
static ɵfac: i0.ɵɵFactoryDeclaration<CustomInjectable, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<CustomInjectable>;
}
export declare class DerivedInjectable extends ParameterizedInjectable {
static ɵfac: i0.ɵɵFactoryDeclaration<DerivedInjectable, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DerivedInjectable>;
}
export declare class DerivedInjectableWithCtor extends ParameterizedInjectable {
constructor();
static ɵfac: i0.ɵɵFactoryDeclaration<DerivedInjectableWithCtor, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DerivedInjectableWithCtor>;
}
export {};

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class MyDir {
foo: string;
bar: string;
custom: string;
mixed: string;
none: string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<MyDir, never, never, { "foo": { "alias": "foo"; "required": false; }; "bar": { "alias": "baz"; "required": false; }; "mixed": { "alias": "mixed"; "required": false; }; }, { "mixed": "mixed"; }, never, never, true, never>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,17 @@
import * as i0 from "@angular/core";
export declare class SomeComp {
prop: any;
otherProp: any;
static ɵfac: i0.ɵɵFactoryDeclaration<SomeComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SomeComp, "some-comp", never, { "prop": { "alias": "prop"; "required": false; }; "otherProp": { "alias": "otherProp"; "required": false; }; }, {}, never, never, false, never>;
}
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>;
}
export declare class MyMod {
static ɵfac: i0.ɵɵFactoryDeclaration<MyMod, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyMod, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyMod>;
}

View file

@ -0,0 +1,17 @@
import * as i0 from "@angular/core";
export declare class SomeComp {
prop: any;
otherProp: any;
static ɵfac: i0.ɵɵFactoryDeclaration<SomeComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SomeComp, "some-comp", never, { "prop": { "alias": "prop"; "required": false; }; "otherProp": { "alias": "otherProp"; "required": false; }; }, {}, never, never, false, never>;
}
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>;
}
export declare class MyMod {
static ɵfac: i0.ɵɵFactoryDeclaration<MyMod, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyMod, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyMod>;
}

View file

@ -0,0 +1,9 @@
import * as i0 from "@angular/core";
export declare class TestComponent {
type: string;
hasFooter: boolean;
hasStructural: boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<TestComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestComponent, "test", never, {}, {}, never, ["basic", "*", "footer", "structural"], true, never>;
}

View file

@ -0,0 +1,6 @@
import * as i0 from "@angular/core";
export declare class SimpleComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SimpleComponent, "simple", never, {}, {}, never, ["*"], false, never>;
}

View file

@ -0,0 +1,7 @@
import * as i0 from "@angular/core";
export declare class MyApp {
show: boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}

View file

@ -0,0 +1,15 @@
import * as i0 from "@angular/core";
export declare class SimpleComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SimpleComponent, "simple", never, {}, {}, never, ["[title]"], false, never>;
}
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,15 @@
import * as i0 from "@angular/core";
export declare class SimpleComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SimpleComponent, "simple", never, {}, {}, never, ["[title]"], false, never>;
}
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,19 @@
import * as i0 from "@angular/core";
export declare class SimpleComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SimpleComponent, "simple", never, {}, {}, never, ["*"], false, never>;
}
export declare class ComplexComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<ComplexComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ComplexComponent, "complex", never, {}, {}, never, ["span[title=toFirst]", "span[title=toSecond]"], false, never>;
}
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,10 @@
import * as i0 from "@angular/core";
export declare class Main {
static ɵfac: i0.ɵɵFactoryDeclaration<Main, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<Main, "ng-component", never, {}, {}, never, never, true, never>;
}
export declare class MainStandalone {
static ɵfac: i0.ɵɵFactoryDeclaration<MainStandalone, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MainStandalone, "ng-component", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class SomeDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SomeDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SomeDirective, "[some-directive]", ["someDir", "otherDir"], {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class HostBindingComp {
static ɵfac: i0.ɵɵFactoryDeclaration<HostBindingComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<HostBindingComp, "host-binding-comp", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class HostBindingComp {
static ɵfac: i0.ɵɵFactoryDeclaration<HostBindingComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<HostBindingComp, "host-binding-comp", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,12 @@
import * as i0 from "@angular/core";
import * as i1 from "external_library";
export declare class TestComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<TestComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
export declare class TestModule {
static ɵfac: i0.ɵɵFactoryDeclaration<TestModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<TestModule, never, [typeof i1.LibModule], never>;
static ɵinj: i0.ɵɵInjectorDeclaration<TestModule>;
}

View file

@ -0,0 +1,26 @@
import * as i0 from "@angular/core";
export declare class LifecycleComp {
nameMin: string;
ngOnChanges(): void;
ngOnInit(): void;
ngDoCheck(): void;
ngAfterContentInit(): void;
ngAfterContentChecked(): void;
ngAfterViewInit(): void;
ngAfterViewChecked(): void;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<LifecycleComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<LifecycleComp, "lifecycle-comp", never, { "nameMin": { "alias": "name"; "required": false; }; }, {}, never, never, false, never>;
}
export declare class SimpleLayout {
name1: string;
name2: string;
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleLayout, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SimpleLayout, "simple-layout", never, {}, {}, never, never, false, never>;
}
export declare class LifecycleModule {
static ɵfac: i0.ɵɵFactoryDeclaration<LifecycleModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<LifecycleModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<LifecycleModule>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,17 @@
import { TemplateRef } from '@angular/core';
import * as i0 from "@angular/core";
export declare class IfDirective {
constructor(template: TemplateRef<any>);
static ɵfac: i0.ɵɵFactoryDeclaration<IfDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<IfDirective, "[if]", never, {}, {}, never, never, false, never>;
}
export declare class MyComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,6 @@
import * as i0 from "@angular/core";
export declare class AbstractDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDirective, never, never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,6 @@
import * as i0 from "@angular/core";
export declare class TestCmp {
static ɵfac: i0.ɵɵFactoryDeclaration<TestCmp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestCmp, "test-cmp", never, {}, {}, never, never, false, never>;
}

View file

@ -0,0 +1,6 @@
import * as i0 from "@angular/core";
export declare class TestCmp {
static ɵfac: i0.ɵɵFactoryDeclaration<TestCmp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestCmp, "test-cmp", never, {}, {}, never, never, false, never>;
}

View file

@ -0,0 +1,6 @@
import * as i0 from "@angular/core";
export declare class TestCmp {
static ɵfac: i0.ɵɵFactoryDeclaration<TestCmp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestCmp, "test-cmp", never, {}, {}, never, never, false, never>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,12 @@
import * as i0 from "@angular/core";
export declare class MyApp {
getFoo(): string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,8 @@
import { PipeTransform } from '@angular/core';
import * as i0 from "@angular/core";
export declare class PipeWithoutName implements PipeTransform {
transform(value: unknown): unknown;
static ɵfac: i0.ɵɵFactoryDeclaration<PipeWithoutName, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<PipeWithoutName, null, true>;
}

View file

@ -0,0 +1,25 @@
import { ChangeDetectorRef, PipeTransform } from '@angular/core';
import * as i0 from "@angular/core";
export declare class MyPipe implements PipeTransform {
constructor(changeDetectorRef: ChangeDetectorRef);
transform(value: any, ...args: any[]): any;
static ɵfac: i0.ɵɵFactoryDeclaration<MyPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<MyPipe, "myPipe", false>;
}
export declare class MyOtherPipe implements PipeTransform {
constructor(changeDetectorRef: ChangeDetectorRef);
transform(value: any, ...args: any[]): any;
static ɵfac: i0.ɵɵFactoryDeclaration<MyOtherPipe, [{ optional: true; }]>;
static ɵpipe: i0.ɵɵPipeDeclaration<MyOtherPipe, "myOtherPipe", false>;
}
export declare class MyApp {
name: string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,19 @@
import { OnDestroy, PipeTransform } from '@angular/core';
import * as i0 from "@angular/core";
export declare class MyPipe implements PipeTransform, OnDestroy {
transform(value: any, ...args: any[]): any;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<MyPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<MyPipe, "myPipe", false>;
}
export declare class MyApp {
name: string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,25 @@
import { OnDestroy, PipeTransform } from '@angular/core';
import * as i0 from "@angular/core";
export declare class MyPipe implements PipeTransform, OnDestroy {
transform(value: any, ...args: any[]): any;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<MyPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<MyPipe, "myPipe", false>;
}
export declare class MyPurePipe implements PipeTransform {
transform(value: any, ...args: any[]): any;
static ɵfac: i0.ɵɵFactoryDeclaration<MyPurePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<MyPurePipe, "myPurePipe", false>;
}
export declare class MyApp {
name: string;
size: number;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,19 @@
import { QueryList } from '@angular/core';
import { SomeDirective } from './some.directive';
import * as i0 from "@angular/core";
export declare class ContentQueryComponent {
someDir: SomeDirective;
someDirList: QueryList<SomeDirective>;
static ɵfac: i0.ɵɵFactoryDeclaration<ContentQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ContentQueryComponent, "content-query-component", never, {}, {}, ["someDir", "someDirList"], ["*"], false, never>;
}
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,14 @@
import { QueryList } from '@angular/core';
import * as i0 from "@angular/core";
export declare class ContentQueryComponent {
myRef: any;
myRefs: QueryList<any>;
static ɵfac: i0.ɵɵFactoryDeclaration<ContentQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ContentQueryComponent, "content-query-component", never, {}, {}, ["myRef", "myRefs"], never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,22 @@
import { QueryList } from '@angular/core';
import * as i0 from "@angular/core";
export declare class ContentQueryComponent {
someDir: SomeDirective;
someDirList: QueryList<SomeDirective>;
static ɵfac: i0.ɵɵFactoryDeclaration<ContentQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ContentQueryComponent, "content-query-component", never, {}, {}, ["someDir", "someDirList"], ["*"], false, never>;
}
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class SomeDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SomeDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SomeDirective, "[someDir]", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,16 @@
import { ElementRef, QueryList, TemplateRef } from '@angular/core';
import * as i0 from "@angular/core";
export declare class ContentQueryComponent {
myRef: TemplateRef<unknown>;
myRefs: QueryList<ElementRef>;
someDir: ElementRef;
someDirs: QueryList<TemplateRef<unknown>>;
static ɵfac: i0.ɵɵFactoryDeclaration<ContentQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ContentQueryComponent, "content-query-component", never, {}, {}, ["myRef", "someDir", "myRefs", "someDirs"], never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,16 @@
import { ElementRef, QueryList } from '@angular/core';
import * as i0 from "@angular/core";
export declare class ContentQueryComponent {
myRefs: QueryList<ElementRef>;
oldMyRefs: QueryList<ElementRef>;
someDirs: QueryList<any>;
oldSomeDirs: QueryList<any>;
static ɵfac: i0.ɵɵFactoryDeclaration<ContentQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ContentQueryComponent, "content-query-component", never, {}, {}, ["myRefs", "oldMyRefs"], never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,6 @@
import * as i0 from "@angular/core";
export declare class SomeDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SomeDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SomeDirective, "[someDir]", never, {}, {}, never, never, false, never>;
}

View file

@ -0,0 +1,19 @@
import { ElementRef } from '@angular/core';
import { SomeDirective } from './some.directive';
import * as i0 from "@angular/core";
export declare class ContentQueryComponent {
someDir: SomeDirective;
foo: ElementRef;
static ɵfac: i0.ɵɵFactoryDeclaration<ContentQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ContentQueryComponent, "content-query-component", never, {}, {}, ["someDir", "foo"], ["*"], false, never>;
}
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,15 @@
import { ElementRef } from '@angular/core';
import { SomeDirective } from './some.directive';
import * as i0 from "@angular/core";
export declare class ViewQueryComponent {
someDir: SomeDirective;
foo: ElementRef;
static ɵfac: i0.ɵɵFactoryDeclaration<ViewQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ViewQueryComponent, "view-query-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,15 @@
import { QueryList } from '@angular/core';
import { SomeDirective } from './some.directive';
import * as i0 from "@angular/core";
export declare class ViewQueryComponent {
someDir: SomeDirective;
someDirs: QueryList<SomeDirective>;
static ɵfac: i0.ɵɵFactoryDeclaration<ViewQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ViewQueryComponent, "view-query-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,14 @@
import { QueryList } from '@angular/core';
import * as i0 from "@angular/core";
export declare class ViewQueryComponent {
myRef: any;
myRefs: QueryList<any>;
static ɵfac: i0.ɵɵFactoryDeclaration<ViewQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ViewQueryComponent, "view-query-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,22 @@
import { QueryList } from '@angular/core';
import * as i0 from "@angular/core";
export declare class ViewQueryComponent {
someDir: SomeDirective;
someDirList: QueryList<SomeDirective>;
static ɵfac: i0.ɵɵFactoryDeclaration<ViewQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ViewQueryComponent, "view-query-component", never, {}, {}, never, never, false, never>;
}
export declare class MyApp {
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class SomeDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SomeDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SomeDirective, "[someDir]", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,16 @@
import { ElementRef, QueryList, TemplateRef } from '@angular/core';
import * as i0 from "@angular/core";
export declare class ViewQueryComponent {
myRef: TemplateRef<unknown>;
myRefs: QueryList<ElementRef>;
someDir: ElementRef;
someDirs: QueryList<TemplateRef<unknown>>;
static ɵfac: i0.ɵɵFactoryDeclaration<ViewQueryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ViewQueryComponent, "view-query-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,10 @@
import * as i0 from "@angular/core";
export declare class OtherCmp {
static ɵfac: i0.ɵɵFactoryDeclaration<OtherCmp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<OtherCmp, "other-cmp", never, {}, {}, never, never, true, never, true>;
}
export declare class SignalCmp {
static ɵfac: i0.ɵɵFactoryDeclaration<SignalCmp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SignalCmp, "ng-component", never, {}, {}, never, never, true, never, true>;
}

View file

@ -0,0 +1,6 @@
import * as i0 from "@angular/core";
export declare class SignalDir {
static ɵfac: i0.ɵɵFactoryDeclaration<SignalDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SignalDir, never, never, {}, {}, never, never, false, never, true>;
}

View file

@ -0,0 +1,10 @@
import * as i0 from "@angular/core";
export declare class OtherCmp {
static ɵfac: i0.ɵɵFactoryDeclaration<OtherCmp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<OtherCmp, "other-cmp", never, {}, {}, never, never, true, never>;
}
export declare class StandaloneCmp {
static ɵfac: i0.ɵɵFactoryDeclaration<StandaloneCmp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<StandaloneCmp, "ng-component", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,6 @@
import * as i0 from "@angular/core";
export declare class StandaloneDir {
static ɵfac: i0.ɵɵFactoryDeclaration<StandaloneDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<StandaloneDir, never, never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,10 @@
import * as i0 from "@angular/core";
export declare class TestComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<TestComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestComponent, "test", never, {}, {}, never, never, true, never>;
}
export declare class StandaloneComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<StandaloneComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<StandaloneComponent, "other-standalone", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,44 @@
import * as i0 from "@angular/core";
export declare class NotStandaloneDir {
static ɵfac: i0.ɵɵFactoryDeclaration<NotStandaloneDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NotStandaloneDir, "[not-standalone]", never, {}, {}, never, never, false, never>;
}
export declare class NotStandalonePipe {
transform(value: any): any;
static ɵfac: i0.ɵɵFactoryDeclaration<NotStandalonePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NotStandalonePipe, "nspipe", false>;
}
export declare class NotStandaloneStuffModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NotStandaloneStuffModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NotStandaloneStuffModule, never, never, [typeof NotStandaloneDir, typeof NotStandalonePipe]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NotStandaloneStuffModule>;
}
export declare class IndirectDir {
static ɵfac: i0.ɵɵFactoryDeclaration<IndirectDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<IndirectDir, "[indirect]", never, {}, {}, never, never, true, never>;
}
export declare class IndirectPipe {
transform(value: any): any;
static ɵfac: i0.ɵɵFactoryDeclaration<IndirectPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<IndirectPipe, "indirectpipe", true>;
}
export declare class SomeModule {
static ɵfac: i0.ɵɵFactoryDeclaration<SomeModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<SomeModule, never, [typeof IndirectDir, typeof IndirectPipe], [typeof NotStandaloneStuffModule, typeof IndirectDir, typeof IndirectPipe]>;
static ɵinj: i0.ɵɵInjectorDeclaration<SomeModule>;
}
export declare class DirectDir {
static ɵfac: i0.ɵɵFactoryDeclaration<DirectDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<DirectDir, "[direct]", never, {}, {}, never, never, true, never>;
}
export declare class DirectPipe {
transform(value: any): any;
static ɵfac: i0.ɵɵFactoryDeclaration<DirectPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<DirectPipe, "directpipe", true>;
}
export declare class TestCmp {
data: boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<TestCmp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestCmp, "test-cmp", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,15 @@
import * as i0 from "@angular/core";
export declare class StandaloneCmp {
static ɵfac: i0.ɵɵFactoryDeclaration<StandaloneCmp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<StandaloneCmp, "standalone-cmp", never, {}, {}, never, never, true, never>;
}
export declare class StandaloneDir {
static ɵfac: i0.ɵɵFactoryDeclaration<StandaloneDir, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<StandaloneDir, never, never, {}, {}, never, never, true, never>;
}
export declare class Module {
static ɵfac: i0.ɵɵFactoryDeclaration<Module, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<Module, never, [typeof StandaloneCmp, typeof StandaloneDir], never>;
static ɵinj: i0.ɵɵInjectorDeclaration<Module>;
}

View file

@ -0,0 +1,7 @@
import * as i0 from "@angular/core";
export declare class StandalonePipe {
transform(value: any): any;
static ɵfac: i0.ɵɵFactoryDeclaration<StandalonePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<StandalonePipe, "stpipe", true>;
}

View file

@ -0,0 +1,6 @@
import * as i0 from "@angular/core";
export declare class RecursiveComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<RecursiveComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<RecursiveComponent, "recursive-cmp", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,19 @@
import { SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
import * as i0 from "@angular/core";
export interface ForOfContext {
$implicit: any;
index: number;
even: boolean;
odd: boolean;
}
export declare class ForOfDirective {
private view;
private template;
private previous;
constructor(view: ViewContainerRef, template: TemplateRef<any>);
forOf: any[];
ngOnChanges(simpleChanges: SimpleChanges): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ForOfDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ForOfDirective, "[forOf]", never, { "forOf": { "alias": "forOf"; "required": false; }; }, {}, never, never, false, never>;
}

View file

@ -0,0 +1,14 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
items: {
name: string;
}[];
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,17 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
items: {
name: string;
infos: {
description: string;
}[];
}[];
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,14 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
items: {
data: number;
}[];
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,9 @@
import * as i0 from "@angular/core";
export declare class ArrayComp {
foo: never[];
bar: never[];
baz: never[];
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayComp, "ng-component", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,17 @@
import * as i0 from "@angular/core";
export declare class MyComp {
names: string[];
static ɵfac: i0.ɵɵFactoryDeclaration<MyComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComp, "my-comp", never, { "names": { "alias": "names"; "required": false; }; }, {}, never, never, false, never>;
}
export declare class MyApp {
customName: string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,25 @@
import * as i0 from "@angular/core";
export declare class MyComp {
names: string[];
static ɵfac: i0.ɵɵFactoryDeclaration<MyComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComp, "my-comp", never, { "names": { "alias": "names"; "required": false; }; }, {}, never, never, false, never>;
}
export declare class MyApp {
n0: string;
n1: string;
n2: string;
n3: string;
n4: string;
n5: string;
n6: string;
n7: string;
n8: string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,10 @@
import * as i0 from "@angular/core";
export declare class TestComp {
foo: never[];
bar: never[];
baz: never[];
fn(..._: any[]): void;
static ɵfac: i0.ɵɵFactoryDeclaration<TestComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestComp, "ng-component", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,15 @@
import * as i0 from "@angular/core";
export declare class SomeDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SomeDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SomeDirective, "div.foo[some-directive]:not([title]):not(.baz)", never, {}, {}, never, never, false, never>;
}
export declare class OtherDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<OtherDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<OtherDirective, ":not(span[title]):not(.baz)", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,19 @@
import * as i0 from "@angular/core";
export declare class ChildComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<ChildComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ChildComponent, "child", never, {}, {}, never, never, false, never>;
}
export declare class SomeDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SomeDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SomeDirective, "[some-directive]", never, {}, {}, never, never, false, never>;
}
export declare class MyComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,7 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
price: string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-comp", never, {}, {}, never, never, false, never>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class SomeComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<SomeComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SomeComponent, "#my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,20 @@
import * as i0 from "@angular/core";
export declare class NestedComp {
config: {
[key: string]: any;
};
static ɵfac: i0.ɵɵFactoryDeclaration<NestedComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NestedComp, "nested-comp", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, false, never>;
}
export declare class MyApp {
name: string;
duration: number;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,15 @@
import * as i0 from "@angular/core";
export declare class RouterOutlet {
static ɵfac: i0.ɵɵFactoryDeclaration<RouterOutlet, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterOutlet, "router-outlet", never, {}, {}, never, never, false, never>;
}
export declare class EmptyOutletComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<EmptyOutletComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<EmptyOutletComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,12 @@
import * as i0 from "@angular/core";
export declare class MyApp {
multiplier: number;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,9 @@
import * as i0 from "@angular/core";
export declare class ObjectComp {
foo: {};
bar: {};
baz: {};
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ObjectComp, "ng-component", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,19 @@
import * as i0 from "@angular/core";
export declare class ObjectComp {
config: {
[key: string]: any;
};
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ObjectComp, "object-comp", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, false, never>;
}
export declare class MyApp {
name: string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,7 @@
import * as i0 from "@angular/core";
export declare class TestComp {
value: string;
static ɵfac: i0.ɵɵFactoryDeclaration<TestComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestComp, "ng-component", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,7 @@
import * as i0 from "@angular/core";
export declare class TestComp {
value: string;
static ɵfac: i0.ɵɵFactoryDeclaration<TestComp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TestComp, "ng-component", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,18 @@
import { TemplateRef } from '@angular/core';
import * as i0 from "@angular/core";
export declare class IfDirective {
constructor(template: TemplateRef<any>);
static ɵfac: i0.ɵɵFactoryDeclaration<IfDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<IfDirective, "[if]", never, {}, {}, never, never, false, never>;
}
export declare class MyComponent {
salutation: string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,14 @@
import * as i0 from "@angular/core";
export declare class UppercasePipe {
transform(value: string): string;
static ɵfac: i0.ɵɵFactoryDeclaration<UppercasePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<UppercasePipe, "uppercase", true>;
}
export declare class MyApp {
name: string;
timeOfDay: string;
tag: (strings: TemplateStringsArray, ...args: string[]) => string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,13 @@
import * as i0 from "@angular/core";
export declare class UppercasePipe {
transform(value: string): string;
static ɵfac: i0.ɵɵFactoryDeclaration<UppercasePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<UppercasePipe, "uppercase", true>;
}
export declare class MyApp {
name: string;
timeOfDay: string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, true, never>;
}

View file

@ -0,0 +1,16 @@
import { ChangeDetectorRef, ElementRef, ViewContainerRef } from '@angular/core';
import * as i0 from "@angular/core";
export declare class MyComponent {
el: ElementRef;
vcr: ViewContainerRef;
cdr: ChangeDetectorRef;
constructor(el: ElementRef, vcr: ViewContainerRef, cdr: ChangeDetectorRef);
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,13 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
error: boolean;
color: string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,11 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

View file

@ -0,0 +1,16 @@
import * as i0 from "@angular/core";
export declare class MyComponent {
expandedHeight: string;
collapsedHeight: string;
expandedWidth: string;
collapsedWidth: string;
getExpandedState(): string;
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, { "expandedHeight": { "alias": "expandedHeight"; "required": false; }; "collapsedHeight": { "alias": "collapsedHeight"; "required": false; }; "expandedWidth": { "alias": "expandedWidth"; "required": false; }; "collapsedWidth": { "alias": "collapsedWidth"; "required": false; }; }, {}, never, never, false, never>;
}
export declare class MyModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
}

Some files were not shown because too many files have changed in this diff Show more