_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
angular/packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts_9832_17961 | getDiagnosticsForFile(sf: ts.SourceFile, optimizeFor: OptimizeFor): ts.Diagnostic[] {
switch (optimizeFor) {
case OptimizeFor.WholeProgram:
this.ensureAllShimsForAllFiles();
break;
case OptimizeFor.SingleFile:
this.ensureAllShimsForOneFile(sf);
break;
}
return th... | {
"end_byte": 17961,
"start_byte": 9832,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts_17965_26555 | private ensureAllShimsForOneFile(sf: ts.SourceFile): void {
this.perf.inPhase(PerfPhase.TcbGeneration, () => {
this.maybeAdoptPriorResultsForFile(sf);
const sfPath = absoluteFromSourceFile(sf);
const fileData = this.getFileData(sfPath);
if (fileData.isComplete) {
// All data for th... | {
"end_byte": 26555,
"start_byte": 17965,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts_26559_34247 | getPrimaryAngularDecorator(target: ts.ClassDeclaration): ts.Decorator | null {
this.ensureAllShimsForOneFile(target.getSourceFile());
if (!isNamedClassDeclaration(target)) {
return null;
}
const ref = new Reference(target);
const dirMeta = this.metaReader.getDirectiveMetadata(ref);
if (di... | {
"end_byte": 34247,
"start_byte": 26559,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts_34248_38422 | class WholeProgramTypeCheckingHost implements TypeCheckingHost {
constructor(private impl: TemplateTypeCheckerImpl) {}
getSourceManager(sfPath: AbsoluteFsPath): TemplateSourceManager {
return this.impl.getFileData(sfPath).sourceManager;
}
shouldCheckComponent(node: ts.ClassDeclaration): boolean {
cons... | {
"end_byte": 38422,
"start_byte": 34248,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/dom.ts_0_6347 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {
DomElementSchemaRegistry,
ParseSourceSpan,
SchemaMetadata,
TmplAstElement,
} from '@angular/compile... | {
"end_byte": 6347,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/dom.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/shim.ts_0_1897 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {absoluteFrom, AbsoluteFsPath, getSourceFileOrError} from '../../file_system';
... | {
"end_byte": 1897,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/shim.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts_0_6460 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {
AbsoluteSourceSpan,
BindingPipe,
PropertyRead,
PropertyWrite,
TmplAstBoundAttribute,
TmplAstBou... | {
"end_byte": 6460,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts_6462_14382 | export class OutOfBandDiagnosticRecorderImpl implements OutOfBandDiagnosticRecorder {
private _diagnostics: TemplateDiagnostic[] = [];
/**
* Tracks which `BindingPipe` nodes have already been recorded as invalid, so only one diagnostic
* is ever produced per node.
*/
private recordedPipes = new Set<Bind... | {
"end_byte": 14382,
"start_byte": 6462,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts_14386_23008 | splitTwoWayBinding(
templateId: TemplateId,
input: TmplAstBoundAttribute,
output: TmplAstBoundEvent,
inputConsumer: ClassDeclaration,
outputConsumer: ClassDeclaration | TmplAstElement,
): void {
const mapping = this.resolver.getSourceMapping(templateId);
const errorMsg = `The property and ... | {
"end_byte": 23008,
"start_byte": 14386,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts_23010_23436 | function makeInlineDiagnostic(
templateId: TemplateId,
code: ErrorCode.INLINE_TCB_REQUIRED | ErrorCode.INLINE_TYPE_CTOR_REQUIRED,
node: ts.Node,
messageText: string | ts.DiagnosticMessageChain,
relatedInformation?: ts.DiagnosticRelatedInformation[],
): TemplateDiagnostic {
return {
...makeDiagnostic(cod... | {
"end_byte": 23436,
"start_byte": 23010,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/expression.ts_0_3070 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {
AST,
AstVisitor,
ASTWithSource,
Binary,
BindingPipe,
Call,
Chain,
Conditional,
EmptyExpr,... | {
"end_byte": 3070,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/expression.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/expression.ts_3072_10885 | class AstTranslator implements AstVisitor {
constructor(
private maybeResolve: (ast: AST) => ts.Expression | null,
private config: TypeCheckingConfig,
) {}
translate(ast: AST): ts.Expression {
// Skip over an `ASTWithSource` as its `visit` method calls directly into its ast's `visit`,
// which wo... | {
"end_byte": 10885,
"start_byte": 3072,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/expression.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/expression.ts_10889_19082 | visitPropertyWrite(ast: PropertyWrite): ts.Expression {
const receiver = wrapForDiagnostics(this.translate(ast.receiver));
const left = ts.factory.createPropertyAccessExpression(receiver, ast.name);
addParseSpanInfo(left, ast.nameSpan);
// TypeScript reports assignment errors on the entire lvalue expres... | {
"end_byte": 19082,
"start_byte": 10889,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/expression.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/expression.ts_19083_21193 | class VeSafeLhsInferenceBugDetector implements AstVisitor {
private static SINGLETON = new VeSafeLhsInferenceBugDetector();
static veWillInferAnyFor(ast: Call | SafeCall | SafePropertyRead | SafeKeyedRead) {
const visitor = VeSafeLhsInferenceBugDetector.SINGLETON;
return ast instanceof Call ? ast.visit(vis... | {
"end_byte": 21193,
"start_byte": 19083,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/expression.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.ts_0_4562 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {OwningModule, Reference} from '../../imports';
import {AmbientImport, Declarati... | {
"end_byte": 4562,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/source.ts_0_3082 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {
AbsoluteSourceSpan,
ParseLocation,
ParseSourceFile,
ParseSourceSpan,
} from '@angular/compiler';
im... | {
"end_byte": 3082,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/source.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.ts_0_8710 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {AbsoluteSourceSpan, ParseSourceSpan, R3Identifiers} from '@angular/compiler';
import ts from 'typescript';
... | {
"end_byte": 8710,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/reference_emit_environment.ts_0_3666 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {
ExpressionType,
ExternalExpr,
TransplantedType,
Type,
TypeModifier,
} from '@angular/compiler';
i... | {
"end_byte": 3666,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/reference_emit_environment.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.ts_0_1787 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {
AST,
ASTWithName,
ASTWithSource,
BindingPipe,
ParseSourceSpan,
PropertyRead,
PropertyWrite,
... | {
"end_byte": 1787,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.ts_1788_10195 | export class SymbolBuilder {
private symbolCache = new Map<AST | TmplAstNode, Symbol | null>();
constructor(
private readonly tcbPath: AbsoluteFsPath,
private readonly tcbIsShim: boolean,
private readonly typeCheckBlock: ts.Node,
private readonly templateData: TemplateData,
private readonly com... | {
"end_byte": 10195,
"start_byte": 1788,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.ts_10199_18829 | private getSymbolOfBoundEvent(eventBinding: TmplAstBoundEvent): OutputBindingSymbol | null {
const consumer = this.templateData.boundTarget.getConsumerOfBinding(eventBinding);
if (consumer === null) {
return null;
}
// Outputs in the TCB look like one of the two:
// * _t1["outputField"].subsc... | {
"end_byte": 18829,
"start_byte": 10199,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.ts_18833_26915 | private getSymbolOfVariable(variable: TmplAstVariable): VariableSymbol | null {
const node = findFirstMatchingNode(this.typeCheckBlock, {
withSpan: variable.sourceSpan,
filter: ts.isVariableDeclaration,
});
if (node === null) {
return null;
}
let nodeValueSymbol: TsNodeSymbolInfo ... | {
"end_byte": 26915,
"start_byte": 18833,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.ts_26919_30377 | private getSymbolOfTsNode(node: ts.Node): TsNodeSymbolInfo | null {
while (ts.isParenthesizedExpression(node)) {
node = node.expression;
}
let tsSymbol: ts.Symbol | undefined;
if (ts.isPropertyAccessExpression(node)) {
tsSymbol = this.getTypeChecker().getSymbolAtLocation(node.name);
} e... | {
"end_byte": 30377,
"start_byte": 26919,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/environment.ts_0_5611 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {
assertSuccessfulReferenceEmit,
ImportFlags,
Reference,
ReferenceEmitt... | {
"end_byte": 5611,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/environment.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/line_mappings.ts_0_2030 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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
*/
const LF_CHAR = 10;
const CR_CHAR = 13;
const LINE_SEP_CHAR = 8232;
const PARAGRAPH_CHAR = 8233;
/** Gets the line ... | {
"end_byte": 2030,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/line_mappings.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/context.ts_0_5863 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {
BoundTarget,
ParseError,
ParseSourceFile,
R3TargetBinder,
SchemaMetadata,
TmplAstNode,
} from '... | {
"end_byte": 5863,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/context.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/context.ts_5864_13051 | export class TypeCheckContextImpl implements TypeCheckContext {
private fileMap = new Map<AbsoluteFsPath, PendingFileTypeCheckingData>();
constructor(
private config: TypeCheckingConfig,
private compilerHost: Pick<ts.CompilerHost, 'getCanonicalFileName'>,
private refEmitter: ReferenceEmitter,
priva... | {
"end_byte": 13051,
"start_byte": 5864,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/context.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/context.ts_13054_21401 | transform(sf: ts.SourceFile): string | null {
// If there are no operations pending for this particular file, return `null` to indicate no
// changes.
if (!this.opMap.has(sf)) {
return null;
}
// Use a `ts.Printer` to generate source code.
const printer = ts.createPrinter({omitTrailingSem... | {
"end_byte": 21401,
"start_byte": 13054,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/context.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/context.ts_21402_22692 | class TypeCtorOp implements Op {
constructor(
readonly ref: Reference<ClassDeclaration<ts.ClassDeclaration>>,
readonly reflector: ReflectionHost,
readonly meta: TypeCtorMetadata,
) {}
/**
* Type constructor operations are inserted immediately before the end of the directive class.
*/
get spli... | {
"end_byte": 22692,
"start_byte": 21402,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/context.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.ts_0_8619 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {ExpressionType, R3Identifiers, WrappedNodeExpr} from '@angular/compiler';
import ts from 'typescript';
impo... | {
"end_byte": 8619,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.ts_8621_11252 | function generateGenericArgs(params: ReadonlyArray<ts.TypeParameterDeclaration>): ts.TypeNode[] {
return params.map((param) => ts.factory.createTypeReferenceNode(param.name, undefined));
}
export function requiresInlineTypeCtor(
node: ClassDeclaration<ts.ClassDeclaration>,
host: ReflectionHost,
env: ReferenceE... | {
"end_byte": 11252,
"start_byte": 8621,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.ts_0_6606 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {addExpressionIdentifier, ExpressionIdentifier} from './comments';
/**
* A `S... | {
"end_byte": 6606,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.ts_0_4546 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {AbsoluteSourceSpan, ParseSourceSpan} from '@angular/compiler';
import ts from 'typescript';
import {Template... | {
"end_byte": 4546,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_0_7611 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {
AST,
BindingPipe,
BindingType,
BoundTarget,
Call,
createCssSelectorFromNode,
CssSelector,
D... | {
"end_byte": 7611,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_7613_14365 | /**
* A code generation operation that's involved in the construction of a Type Check Block.
*
* The generation of a TCB is non-linear. Bindings within a template may result in the need to
* construct certain types earlier than they otherwise would be constructed. That is, if the
* generation of a TCB for a templa... | {
"end_byte": 14365,
"start_byte": 7613,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_14366_23275 | class TcbTemplateBodyOp extends TcbOp {
constructor(
private tcb: Context,
private scope: Scope,
private template: TmplAstTemplate,
) {
super();
}
override get optional() {
return false;
}
override execute(): null {
// An `if` will be constructed, within which the template's childr... | {
"end_byte": 23275,
"start_byte": 14366,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_23276_31896 | class TcbNonGenericDirectiveTypeOp extends TcbDirectiveTypeOpBase {
/**
* Creates a variable declaration for this op's directive of the argument type. Returns the id of
* the newly created variable.
*/
override execute(): ts.Identifier {
const dirRef = this.dir.ref as Reference<ClassDeclaration<ts.Clas... | {
"end_byte": 31896,
"start_byte": 23276,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_31897_40893 | class TcbDirectiveInputsOp extends TcbOp {
constructor(
private tcb: Context,
private scope: Scope,
private node: TmplAstTemplate | TmplAstElement,
private dir: TypeCheckableDirectiveMeta,
) {
super();
}
override get optional() {
return false;
}
override execute(): null {
let d... | {
"end_byte": 40893,
"start_byte": 31897,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_40895_48132 | /**
* A `TcbOp` which feeds elements and unclaimed properties to the `DomSchemaChecker`.
*
* The DOM schema is not checked via TCB code generation. Instead, the `DomSchemaChecker` ingests
* elements and property bindings and accumulates synthetic `ts.Diagnostic`s out-of-band. These are
* later merged with the diag... | {
"end_byte": 48132,
"start_byte": 40895,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_48133_57376 | class TcbUnclaimedInputsOp extends TcbOp {
constructor(
private tcb: Context,
private scope: Scope,
private element: TmplAstElement,
private claimedInputs: Set<string>,
) {
super();
}
override get optional() {
return false;
}
override execute(): null {
// `this.inputs` contains... | {
"end_byte": 57376,
"start_byte": 48133,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_57378_64209 | /**
* A `TcbOp` which renders a variable defined inside of block syntax (e.g. `@if (expr; as var) {}`).
*
* Executing this operation returns the identifier which can be used to refer to the variable.
*/
class TcbBlockVariableOp extends TcbOp {
constructor(
private tcb: Context,
private scope: Scope,
p... | {
"end_byte": 64209,
"start_byte": 57378,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_64210_71306 | class TcbSwitchOp extends TcbOp {
constructor(
private tcb: Context,
private scope: Scope,
private block: TmplAstSwitchBlock,
) {
super();
}
override get optional() {
return false;
}
override execute(): null {
const switchExpression = tcbExpression(this.block.expression, this.tcb, ... | {
"end_byte": 71306,
"start_byte": 64210,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_71307_79234 | class Scope {
/**
* A queue of operations which need to be performed to generate the TCB code for this scope.
*
* This array can contain either a `TcbOp` which has yet to be executed, or a `ts.Expression|null`
* representing the memoized result of executing the operation. As operations are executed, their... | {
"end_byte": 79234,
"start_byte": 71307,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_79237_85880 | resolve(
node: LocalSymbol,
directive?: TypeCheckableDirectiveMeta,
): ts.Identifier | ts.NonNullExpression {
// Attempt to resolve the operation locally.
const res = this.resolveLocal(node, directive);
if (res !== null) {
// We want to get a clone of the resolved expression and clear the tr... | {
"end_byte": 85880,
"start_byte": 79237,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_85884_93140 | private appendNode(node: TmplAstNode): void {
if (node instanceof TmplAstElement) {
const opIndex = this.opQueue.push(new TcbElementOp(this.tcb, this, node)) - 1;
this.elementOpMap.set(node, opIndex);
if (this.tcb.env.config.controlFlowPreventingContentProjection !== 'suppress') {
this.app... | {
"end_byte": 93140,
"start_byte": 85884,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_93144_99741 | ivate appendOutputsOfNode(node: TmplAstElement | TmplAstTemplate): void {
// Collect all the outputs on the element.
const claimedOutputs = new Set<string>();
const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
if (directives === null || directives.length === 0) {
// If there are no... | {
"end_byte": 99741,
"start_byte": 93144,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_99743_108527 | ass TcbExpressionTranslator {
constructor(
protected tcb: Context,
protected scope: Scope,
) {}
translate(ast: AST): ts.Expression {
// `astToTypescript` actually does the conversion. A special resolver `tcbResolve` is passed
// which interprets specific expression nodes that interact with the `I... | {
"end_byte": 108527,
"start_byte": 99743,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_108528_117294 | nction tcbCallTypeCtor(
dir: TypeCheckableDirectiveMeta,
tcb: Context,
inputs: TcbDirectiveInput[],
): ts.Expression {
const typeCtor = tcb.env.typeCtorFor(dir);
// Construct an array of `ts.PropertyAssignment`s for each of the directive's inputs.
const members = inputs.map((input) => {
const propertyN... | {
"end_byte": 117294,
"start_byte": 108528,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts_117296_120525 | nction isSplitTwoWayBinding(
inputName: string,
output: TmplAstBoundEvent,
inputs: TmplAstBoundAttribute[],
tcb: Context,
) {
const input = inputs.find((input) => input.name === inputName);
if (input === undefined || input.sourceSpan !== output.sourceSpan) {
return false;
}
// Input consumer should ... | {
"end_byte": 120525,
"start_byte": 117296,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/completion.ts_0_8490 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {
AST,
EmptyExpr,
ImplicitReceiver,
LetDeclaration,
LiteralPrimitive,
PropertyRead,
PropertyWri... | {
"end_byte": 8490,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/completion.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/symbol_util.ts_0_1577 | /*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {Symbol, SymbolKind} from '../api';
/** Names of known signal functions. */
co... | {
"end_byte": 1577,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/symbol_util.ts"
} |
angular/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.ts_0_4822 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {AbsoluteFsPath, join} from '../../file_system';
import {Reference, ReferenceEmi... | {
"end_byte": 4822,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.ts"
} |
angular/packages/compiler-cli/src/ngtsc/resource/BUILD.bazel_0_553 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "resource",
srcs = ["index.ts"] + glob([
"src/*.ts",
]),
module_name = "@angular/compiler-cli/src/ngtsc/resource",
deps = [
"//packages:types",
"//packages/co... | {
"end_byte": 553,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/resource/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/resource/index.ts_0_256 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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
*/
export {AdapterResourceLoader} from './src/loader';
| {
"end_byte": 256,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/resource/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/resource/src/loader.ts_0_766 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {ResourceLoader, ResourceLoaderContext} from '../../annotations';
import {NgCom... | {
"end_byte": 766,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/resource/src/loader.ts"
} |
angular/packages/compiler-cli/src/ngtsc/resource/src/loader.ts_767_9693 | export class AdapterResourceLoader implements ResourceLoader {
private cache = new Map<string, string>();
private fetching = new Map<string, Promise<void>>();
private lookupResolutionHost: RequiredDelegations<ts.ModuleResolutionHost>;
canPreload: boolean;
canPreprocess: boolean;
constructor(
private a... | {
"end_byte": 9693,
"start_byte": 767,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/resource/src/loader.ts"
} |
angular/packages/compiler-cli/src/ngtsc/resource/src/loader.ts_9695_11107 | /**
* Derives a `ts.ModuleResolutionHost` from a compiler adapter that recognizes the special resource
* marker and does not go to the filesystem for these requests, as they are known not to exist.
*/
function createLookupResolutionHost(
adapter: NgCompilerAdapter,
): RequiredDelegations<ts.ModuleResolutionHost> {... | {
"end_byte": 11107,
"start_byte": 9695,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/resource/src/loader.ts"
} |
angular/packages/compiler-cli/src/ngtsc/perf/README.md_0_1698 | # What is the `perf` package?
This package contains utilities for collecting performance information from around the compiler and for producing ngtsc performance traces.
This feature is currently undocumented and not exposed to users as the trace file format is still unstable.
# What is a performance trace?
A perfo... | {
"end_byte": 1698,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/perf/README.md"
} |
angular/packages/compiler-cli/src/ngtsc/perf/BUILD.bazel_0_298 | package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "perf",
srcs = ["index.ts"] + glob([
"src/*.ts",
]),
deps = [
"//packages:types",
"@npm//@types/node",
"@npm//typescript",
],
)
| {
"end_byte": 298,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/perf/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/perf/index.ts_0_353 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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
*/
export * from './src/api';
export {NOOP_PERF_RECORDER} from './src/noop';
export {ActivePerfRecorder, DelegatingPerf... | {
"end_byte": 353,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/perf/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/perf/src/noop.ts_0_573 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {PerfPhase, PerfRecorder} from './api';
class NoopPerfRecorder implements PerfRecorder {
eventCount(): void... | {
"end_byte": 573,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/perf/src/noop.ts"
} |
angular/packages/compiler-cli/src/ngtsc/perf/src/api.ts_0_8282 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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
*/
/**
* A phase of compilation for which time is tracked in a distinct bucket.
*/
export enum PerfPhase {
/**
*... | {
"end_byte": 8282,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/perf/src/api.ts"
} |
angular/packages/compiler-cli/src/ngtsc/perf/src/api.ts_8283_9682 | export interface PerfRecorder {
/**
* Set the current phase of compilation.
*
* Time spent in the previous phase will be accounted to that phase. The caller is responsible for
* exiting the phase when work that should be tracked within it is completed, and either returning
* to the previous phase or tr... | {
"end_byte": 9682,
"start_byte": 8283,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/perf/src/api.ts"
} |
angular/packages/compiler-cli/src/ngtsc/perf/src/recorder.ts_0_4415 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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
*/
/// <reference types="node" />
import {PerfCheckpoint, PerfEvent, PerfPhase, PerfRecorder} from './api';
import {HrT... | {
"end_byte": 4415,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/perf/src/recorder.ts"
} |
angular/packages/compiler-cli/src/ngtsc/perf/src/clock.ts_0_524 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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
*/
// This file uses 'process'
/// <reference types="node" />
export type HrTime = [number, number];
export function ... | {
"end_byte": 524,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/perf/src/clock.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/BUILD.bazel_0_1149 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "transform",
srcs = ["index.ts"] + glob([
"src/**/*.ts",
]),
deps = [
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/core:api",
"//packages/com... | {
"end_byte": 1149,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/transform/index.ts_0_639 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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
*/
export * from './src/api';
export {aliasTransformFactory} from './src/alias';
export {ClassRecord, TraitCompiler} fr... | {
"end_byte": 639,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/test/BUILD.bazel_0_926 | load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "test_lib",
testonly = True,
srcs = glob([
"**/*.ts",
]),
deps = [
"//packages:types",
"//packages/compiler",
"//packages/compile... | {
"end_byte": 926,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/test/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/transform/test/compilation_spec.ts_0_1020 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {ConstantPool} from '@angular/compiler';
import * as o from '@angular/compiler/src/output/output_ast';
import... | {
"end_byte": 1020,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/test/compilation_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/test/compilation_spec.ts_1022_10439 | runInEachFileSystem(() => {
describe('TraitCompiler', () => {
let _: typeof absoluteFrom;
beforeEach(() => (_ = absoluteFrom));
function setup(
programContents: string,
handlers: DecoratorHandler<{} | null, unknown, null, unknown>[],
compilationMode: CompilationMode,
makeDtsSource... | {
"end_byte": 10439,
"start_byte": 1022,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/test/compilation_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/test/compilation_spec.ts_10445_13292 | describe('local compilation', () => {
class TestDecoratorHandler implements DecoratorHandler<{}, {}, null, unknown> {
name = 'TestDecoratorHandler';
precedence = HandlerPrecedence.PRIMARY;
detect(
node: ClassDeclaration,
decorators: Decorator[] | null,
): Detec... | {
"end_byte": 13292,
"start_byte": 10445,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/test/compilation_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/BUILD.bazel_0_580 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "jit",
srcs = glob(["**/*.ts"]),
deps = [
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/annotations",
"//packages/compiler-cli/src/ngtsc/imports",
... | {
"end_byte": 580,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/index.ts_0_337 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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
*/
export {
angularJitApplicationTransform,
getDownlevelDecoratorsTransform,
getInitializerApiJitTransform,
} fro... | {
"end_byte": 337,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/test/downlevel_decorators_transform_spec.ts_0_8686 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {TypeScriptReflectionHost} from '../../../reflection';
import {getDownlevelDeco... | {
"end_byte": 8686,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/test/downlevel_decorators_transform_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/test/downlevel_decorators_transform_spec.ts_8689_16510 | it('should downlevel Angular-decorated class member but not preserve type', () => {
context.writeFile('/other-file.ts', `export class MyOtherClass {}`);
const {output} = transform(`
import {Input} from '@angular/core';
import {MyOtherClass} from './other-file';
export class MyDir {
... | {
"end_byte": 16510,
"start_byte": 8689,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/test/downlevel_decorators_transform_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/test/downlevel_decorators_transform_spec.ts_16514_23004 | it('should not generate invalid reference due to conflicting parameter name', () => {
context.writeFile(
'/external.ts',
`
export class Dep {
greet() {}
}
`,
);
const {output} = transform(
`
import {Directive} from '@angular/core';
import {Dep} fro... | {
"end_byte": 23004,
"start_byte": 16514,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/test/downlevel_decorators_transform_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/test/downlevel_decorators_transform_spec.ts_23008_27724 | describe('transforming multiple files', () => {
it('should work correctly for multiple files that import distinct declarations', () => {
context.writeFile(
'foo_service.d.ts',
`
export declare class Foo {};
`,
);
context.writeFile(
'foo.ts',
`
... | {
"end_byte": 27724,
"start_byte": 23008,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/test/downlevel_decorators_transform_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/test/signal_queries_metadata_transform_spec.ts_0_8024 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {ImportedSymbolsTracker} from '../../../imports';
import {TypeScriptReflectionH... | {
"end_byte": 8024,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/test/signal_queries_metadata_transform_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/test/initializer_api_transforms_spec.ts_0_2760 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {ImportedSymbolsTracker} from '../../../imports';
import {TypeScriptReflectionH... | {
"end_byte": 2760,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/test/initializer_api_transforms_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/test/initializer_api_transforms_spec.ts_2764_11264 | describe('input()', () => {
it('should add `@Input` decorator for a signal input', () => {
const result = transform(`
import {input, Directive} from '@angular/core';
@Directive({})
class MyDir {
someInput = input(0);
}
`);
expect(result).toContain(
... | {
"end_byte": 11264,
"start_byte": 2764,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/test/initializer_api_transforms_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/test/initializer_api_transforms_spec.ts_11268_17075 | describe('model()', () => {
it('should add `@Input` and `@Output` decorators for a model input', () => {
const result = transform(`
import {model, Directive} from '@angular/core';
@Directive({})
class MyDir {
value = model(0);
}
`);
expect(result).toCont... | {
"end_byte": 17075,
"start_byte": 11268,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/test/initializer_api_transforms_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/test/BUILD.bazel_0_746 | load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
ts_library(
name = "test_lib",
testonly = True,
srcs = [
"downlevel_decorators_transform_spec.ts",
"initializer_api_transforms_spec.ts",
"signal_queries_metadata_transform_spec.ts",
],
deps = [
"//packag... | {
"end_byte": 746,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/test/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.ts_0_8927 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {isAliasImportDeclaration, loadIsReferencedAliasDeclarationPatch} from '../../.... | {
"end_byte": 8927,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.ts_8929_12802 | /**
* Checks whether a given symbol refers to a value that exists at runtime (as distinct from a type).
*
* Expands aliases, which is important for the case where
* import * as x from 'some-module';
* and x is now a value (the module object).
*/
function symbolIsRuntimeValue(typeChecker: ts.TypeChecker, symbol:... | {
"end_byte": 12802,
"start_byte": 8929,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.ts_12806_21242 | return (context: ts.TransformationContext) => {
// Ensure that referenced type symbols are not elided by TypeScript. Imports for
// such parameter type symbols previously could be type-only, but now might be also
// used in the `ctorParameters` static property as a value. We want to make sure
// that Ty... | {
"end_byte": 21242,
"start_byte": 12806,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.ts_21247_26261 | function transformClassDeclaration(classDecl: ts.ClassDeclaration): ts.ClassDeclaration {
const newMembers: ts.ClassElement[] = [];
const decoratedProperties = new Map<string, ts.Decorator[]>();
let classParameters: ParameterDecorationInfo[] | null = null;
for (const member of classDecl.members... | {
"end_byte": 26261,
"start_byte": 21247,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/index.ts_0_2636 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {ImportedSymbolsTracker} from '../../../imports';
import {TypeScriptReflectionH... | {
"end_byte": 2636,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/query_functions.ts_0_3297 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {
getAngularDecorators,
queryDecoratorNames,
QueryFunctionName,
tryParseSignalQueryFromInitializer,
}... | {
"end_byte": 3297,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/query_functions.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/transform.ts_0_4775 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {isAngularDecorator} from '../../../../annotations';
import {ImportedSymbolsTra... | {
"end_byte": 4775,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/transform.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/input_function.ts_0_3221 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {core} from '@angular/compiler';
import ts from 'typescript';
import {isAngularDecorator, tryParseSignalInpu... | {
"end_byte": 3221,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/input_function.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/model_function.ts_0_3156 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {Decorator} from '@angular/compiler-cli/src/ngtsc/reflection';
import ts from 'typescript';
import {isAngula... | {
"end_byte": 3156,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/model_function.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/transform_api.ts_0_2291 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 ts from 'typescript';
import {ImportedSymbolsTracker} from '../../../../imports';
import {ClassMember, Decor... | {
"end_byte": 2291,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/transform_api.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/output_function.ts_0_2039 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {isAngularDecorator, tryParseInitializerBasedOutput} from '../../../../annotations';
import {createSynthetic... | {
"end_byte": 2039,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/output_function.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/src/transform.ts_0_3800 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {ConstantPool} from '@angular/compiler';
import ts from 'typescript';
import {
DefaultImportTracker,
Imp... | {
"end_byte": 3800,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/src/transform.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/src/transform.ts_3801_12367 | class IvyTransformationVisitor extends Visitor {
constructor(
private compilation: TraitCompiler,
private classCompilationMap: Map<ts.ClassDeclaration, CompileResult[]>,
private reflector: ReflectionHost,
private importManager: ImportManager,
private recordWrappedNodeExpr: RecordWrappedNodeFn<ts.E... | {
"end_byte": 12367,
"start_byte": 3801,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/src/transform.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/src/transform.ts_12368_19344 | nction transformIvySourceFile(
compilation: TraitCompiler,
context: ts.TransformationContext,
reflector: ReflectionHost,
importRewriter: ImportRewriter,
localCompilationExtraImportsTracker: LocalCompilationExtraImportsTracker | null,
file: ts.SourceFile,
isCore: boolean,
isClosureCompilerEnabled: boolea... | {
"end_byte": 19344,
"start_byte": 12368,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/src/transform.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/src/compilation.ts_0_2748 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {ConstantPool} from '@angular/compiler';
import ts from 'typescript';
import {SourceFileTypeIdentifier} from... | {
"end_byte": 2748,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/src/compilation.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/src/compilation.ts_2749_9355 | export class TraitCompiler implements ProgramTypeCheckAdapter {
/**
* Maps class declarations to their `ClassRecord`, which tracks the Ivy traits being applied to
* those classes.
*/
private classes = new Map<ClassDeclaration, ClassRecord>();
/**
* Maps source files to any class declaration(s) within... | {
"end_byte": 9355,
"start_byte": 2749,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/src/compilation.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/src/compilation.ts_9359_17028 | protected detectTraits(
clazz: ClassDeclaration,
decorators: Decorator[] | null,
): PendingTrait<unknown, unknown, SemanticSymbol | null, unknown>[] | null {
let record: ClassRecord | null = this.recordFor(clazz);
let foundTraits: PendingTrait<unknown, unknown, SemanticSymbol | null, unknown>[] = [];
... | {
"end_byte": 17028,
"start_byte": 9359,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/src/compilation.ts"
} |
angular/packages/compiler-cli/src/ngtsc/transform/src/compilation.ts_17032_25883 | resolve(): void {
const classes = this.classes.keys();
for (const clazz of classes) {
const record = this.classes.get(clazz)!;
for (let trait of record.traits) {
const handler = trait.handler;
switch (trait.state) {
case TraitState.Skipped:
continue;
c... | {
"end_byte": 25883,
"start_byte": 17032,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/transform/src/compilation.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.