_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.ts_0_5515 | /**
* @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 {ErrorCode, FatalDiagnosticError} from '../../../diagnostics';
import {Referenc... | {
"end_byte": 5515,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts_0_7559 | /**
* @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 {
compileClassMetadata,
compileDeclareClassMetadata,
compileDeclareInjectorFromMetadata,
compileDecla... | {
"end_byte": 7559,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts_7560_9246 | export class NgModuleDecoratorHandler
implements DecoratorHandler<Decorator, NgModuleAnalysis, NgModuleSymbol, NgModuleResolution>
{
constructor(
private reflector: ReflectionHost,
private evaluator: PartialEvaluator,
private metaReader: MetadataReader,
private metaRegistry: MetadataRegistry,
pr... | {
"end_byte": 9246,
"start_byte": 7560,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts_9250_17181 | analyze(
node: ClassDeclaration,
decorator: Readonly<Decorator>,
): AnalysisOutput<NgModuleAnalysis> {
this.perf.eventCount(PerfEvent.AnalyzeNgModule);
const name = node.name.text;
if (decorator.args === null || decorator.args.length > 1) {
throw new FatalDiagnosticError(
ErrorCode.... | {
"end_byte": 17181,
"start_byte": 9250,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts_17186_25710 | if (this.compilationMode === CompilationMode.LOCAL) {
ngModuleMetadata = {
kind: R3NgModuleMetadataKind.Local,
type,
bootstrapExpression: rawBootstrap ? new WrappedNodeExpr(rawBootstrap) : null,
declarationsExpression: rawDeclarations ? new WrappedNodeExpr(rawDeclarations) : null,
... | {
"end_byte": 25710,
"start_byte": 17186,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts_25714_33727 | lve(
node: ClassDeclaration,
analysis: Readonly<NgModuleAnalysis>,
): ResolveResult<NgModuleResolution> {
if (this.compilationMode === CompilationMode.LOCAL) {
return {};
}
const scope = this.scopeRegistry.getScopeOfModule(node);
const diagnostics: ts.Diagnostic[] = [];
const scope... | {
"end_byte": 33727,
"start_byte": 25714,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts_33730_42019 | ate appendRemoteScopingStatements(
ngModuleStatements: Statement[],
node: ClassDeclaration,
declarations: Reference<ClassDeclaration>[],
remoteScopesMayRequireCycleProtection: boolean,
): void {
// Local compilation mode generates its own runtimes to compute the dependencies. So there no
// ne... | {
"end_byte": 42019,
"start_byte": 33730,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/README.md_0_553 | # What is the 'annotations/component' package?
This package implements the `ComponentDecoratorHandler`, which processes and compiles `@Component`-decorated classes.
Component compilation is complex, and so not only is this package split out from the parent 'annotations' package, but its functionality is divided into ... | {
"end_byte": 553,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/README.md"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/BUILD.bazel_0_1651 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "component",
srcs = ["index.ts"] + glob([
"src/**/*.ts",
]),
deps = [
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/annotations/common",
"//pa... | {
"end_byte": 1651,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/index.ts_0_261 | /**
* @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 {ComponentDecoratorHandler} from './src/handler';
| {
"end_byte": 261,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts_0_5275 | /**
* @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, ViewEncapsulation} from '@angular/compiler';
import ts from 'typescript';
import {CycleAnalyz... | {
"end_byte": 5275,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts_5276_14261 | () => {
let _: typeof absoluteFrom;
beforeEach(() => (_ = absoluteFrom));
it('should produce a diagnostic when @Component has non-literal argument', () => {
const {program, options, host} = makeProgram([
{
name: _('/node_modules/@angular/core/index.d.ts'),
contents: 'expor... | {
"end_byte": 14261,
"start_byte": 5276,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts_14267_22847 | it('should populate externalStyles from styleUrls when externalRuntimeStyles is enabled', () => {
const {program, options, host} = makeProgram([
{
name: _('/node_modules/@angular/core/index.d.ts'),
contents: 'export const Component: any;',
},
{
name: _('/mySty... | {
"end_byte": 22847,
"start_byte": 14267,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts_22853_31447 | it('should not populate externalStyles from inline style when externalRuntimeStyles is enabled and no preanalyze', async () => {
const {program, options, host} = makeProgram([
{
name: _('/node_modules/@angular/core/index.d.ts'),
contents: 'export const Component: any;',
},
... | {
"end_byte": 31447,
"start_byte": 22853,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts_31453_36419 | it('should evaluate the name of animations', () => {
const {program, options, host} = makeProgram([
{
name: _('/node_modules/@angular/core/index.d.ts'),
contents: 'export const Component: any;',
},
{
name: _('/node_modules/@angular/animations/index.d.ts'),
... | {
"end_byte": 36419,
"start_byte": 31453,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts_36425_42772 | describe('localCompilation', () => {
it('should not produce diagnostic for cross-file imports in standalone component', () => {
const {program, options, host} = makeProgram(
[
{
name: _('/node_modules/@angular/core/index.d.ts'),
contents: 'export const Com... | {
"end_byte": 42772,
"start_byte": 36425,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/test/component_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/test/BUILD.bazel_0_1262 | 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": 1262,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/test/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.ts_0_8560 | /**
* @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 {
DEFAULT_INTERPOLATION_CONFIG,
InterpolationConfig,
LexerRange,
ParsedTemplate,
ParseSourceFile,
... | {
"end_byte": 8560,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.ts_8562_17131 | function parseExtractedTemplate(
template: TemplateDeclaration,
sourceStr: string,
sourceParseRange: LexerRange | null,
escapedString: boolean,
sourceMapUrl: string | null,
options: ExtractTemplateOptions,
): ParsedComponentTemplate {
// We always normalize line endings if the template has been escaped (i... | {
"end_byte": 17131,
"start_byte": 8562,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.ts_17133_23943 | export function makeResourceNotFoundError(
file: string,
nodeForError: ts.Node,
resourceType: ResourceTypeForDiagnostics,
): FatalDiagnosticError {
let errorText: string;
switch (resourceType) {
case ResourceTypeForDiagnostics.Template:
errorText = `Could not find template file '${file}'.`;
br... | {
"end_byte": 23943,
"start_byte": 17133,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.ts_0_4130 | /**
* @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 {
isArrayEqual,
isReferenceEqual,
SemanticReference,
SemanticSymbol,
} from '../../../incremental/sem... | {
"end_byte": 4130,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.ts_0_1918 | /**
* @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 {Cycle} from '../../../cycles';
import {makeRelatedInformation} from '../../../... | {
"end_byte": 1918,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/util.ts_0_5653 | /**
* @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 {AnimationTriggerNames} from '@angular/compiler';
import {
isResolvedModuleWithProviders,
ResolvedModuleW... | {
"end_byte": 5653,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/util.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts_0_5874 | /**
* @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 {
AnimationTriggerNames,
BoundTarget,
compileClassDebugInfo,
compileHmrInitializer,
compileComponen... | {
"end_byte": 5874,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts_5875_14783 | export class ComponentDecoratorHandler
implements
DecoratorHandler<Decorator, ComponentAnalysisData, ComponentSymbol, ComponentResolutionData>
{
constructor(
private reflector: ReflectionHost,
private evaluator: PartialEvaluator,
private metaRegistry: MetadataRegistry,
private metaReader: Metada... | {
"end_byte": 14783,
"start_byte": 5875,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts_14787_22724 | analyze(
node: ClassDeclaration,
decorator: Readonly<Decorator>,
): AnalysisOutput<ComponentAnalysisData> {
this.perf.eventCount(PerfEvent.AnalyzeComponent);
const containingFile = node.getSourceFile().fileName;
this.literalCache.delete(decorator);
let diagnostics: ts.Diagnostic[] | undefined... | {
"end_byte": 22724,
"start_byte": 14787,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts_22729_32471 | if (this.preanalyzeTemplateCache.has(node)) {
// The template was parsed in preanalyze. Use it and delete it to save memory.
const preanalyzed = this.preanalyzeTemplateCache.get(node)!;
this.preanalyzeTemplateCache.delete(node);
template = preanalyzed;
} else {
const templateDecl = pa... | {
"end_byte": 32471,
"start_byte": 22729,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts_32475_40682 | symbol(node: ClassDeclaration, analysis: Readonly<ComponentAnalysisData>): ComponentSymbol {
const typeParameters = extractSemanticTypeParameters(node);
return new ComponentSymbol(
node,
analysis.meta.selector,
analysis.inputs,
analysis.outputs,
analysis.meta.exportAs,
analy... | {
"end_byte": 40682,
"start_byte": 32475,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts_40683_50330 | {
// Replace the empty components and directives from the analyze() step with a fully expanded
// scope. This is possible now because during resolve() the whole compilation unit has been
// fully analyzed.
//
// First it needs to be determined if actually importing the directives/pipes use... | {
"end_byte": 50330,
"start_byte": 40683,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts_50337_60023 | onst standaloneImportMayBeForwardDeclared =
analysis.resolvedImports !== null && analysis.resolvedImports.some((ref) => ref.synthetic);
const cycleDetected = cyclesFromDirectives.size !== 0 || cyclesFromPipes.size !== 0;
if (!cycleDetected) {
// No cycle was detected. Record the imports tha... | {
"end_byte": 60023,
"start_byte": 50337,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts_60027_68657 | mpileFull(
node: ClassDeclaration,
analysis: Readonly<ComponentAnalysisData>,
resolution: Readonly<ComponentResolutionData>,
pool: ConstantPool,
): CompileResult[] {
if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
return [];
}
const perComponentDeferr... | {
"end_byte": 68657,
"start_byte": 60027,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts_68660_77026 | e resolveAllDeferredDependencies(
resolution: Readonly<ComponentResolutionData>,
): R3DeferPerComponentDependency[] {
const deferrableTypes: R3DeferPerComponentDependency[] = [];
// Go over all dependencies of all defer blocks and update the value of
// the `isDeferrable` flag and the `importPath` to ... | {
"end_byte": 77026,
"start_byte": 68660,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts_77030_83032 | e compileDeferBlocks(
resolution: Readonly<Partial<ComponentResolutionData>>,
): R3ComponentDeferMetadata {
const {
deferBlockDepsEmitMode: mode,
deferPerBlockDependencies: perBlockDeps,
deferPerComponentDependencies: perComponentDeps,
} = resolution;
if (mode === DeferBlockDepsEmit... | {
"end_byte": 83032,
"start_byte": 77030,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/component/src/metadata.ts_0_4819 | /**
* @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 {
AnimationTriggerNames,
DeclarationListEmitMode,
DeferBlockDepsEmitMode,
R3ClassDebugInfo,
R3Class... | {
"end_byte": 4819,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/component/src/metadata.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/README.md_0_500 | # What is the 'annotations/common' package?
This package contains common code related to the processing of Angular-decorated classes by `DecoratorHandler` implementations. Some common utilities provided by this package help with:
* Static evaluation of different kinds of expressions
* Construction of various diagnost... | {
"end_byte": 500,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/README.md"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/BUILD.bazel_0_745 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "common",
srcs = ["index.ts"] + glob([
"src/**/*.ts",
]),
deps = [
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/diagnostics",
"//packages/com... | {
"end_byte": 745,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/index.ts_0_655 | /**
* @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 * from './src/di';
export * from './src/diagnostics';
export * from './src/evaluat... | {
"end_byte": 655,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/test/metadata_spec.ts_0_5093 | /**
* @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 {compileClassMetadata} from '@angular/compiler';
import ts from 'typescript';
import {absoluteFrom, getSource... | {
"end_byte": 5093,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/test/metadata_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/test/diagnostics_spec.ts_0_5609 | /**
* @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 as _, getSourceFileOrError} from '../../../file_system';
import {... | {
"end_byte": 5609,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/test/diagnostics_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/test/util_spec.ts_0_1394 | /**
* @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 {unwrapExpression} from '../src/util';
describe('ngtsc annotation utilities', ... | {
"end_byte": 1394,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/test/util_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/test/BUILD.bazel_0_932 | 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": 932,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/test/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.ts_0_2043 | /**
* @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 {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from '@angular/compiler';
import ts from 'typescri... | {
"end_byte": 2043,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/standalone-default-value.ts_0_423 | /**
* @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.io/license
*/
/**
* A constant defining the default value for the standalone attribute in Directive and Pipes decorators.
* Extra... | {
"end_byte": 423,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/standalone-default-value.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.ts_0_1764 | /**
* @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 {R3DependencyMetadata} from '@angular/compiler';
import {hasInjectableFields} from '../../../metadata';
impor... | {
"end_byte": 1764,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.ts_0_887 | /**
* @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 {Reference} from '../../../imports';
import {DeclarationNode} from '../../../reflection';
/**
* Implement t... | {
"end_byte": 887,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.ts_0_1148 | /*!
* @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 {outputAst} from '@angular/compiler';
import {ClassPropertyMapping, InputMapping} from '../../../metadata';
... | {
"end_byte": 1148,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/api.ts_0_3985 | /**
* @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
*/
/**
* Resolves and loads resource files that are referenced in Angular metadata.
*
* Note that `preload()` and `l... | {
"end_byte": 3985,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/api.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.ts_0_1030 | /**
* @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 {
compileDeclareFactoryFunction,
compileFactoryFunction,
R3FactoryMetadata,
} from '@angular/compiler';... | {
"end_byte": 1030,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/debug_info.ts_0_1199 | /**
* @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 {literal, R3ClassDebugInfo, WrappedNodeExpr} from '@angular/compiler';
import ts from 'typescript';
import {... | {
"end_byte": 1199,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/debug_info.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/di.ts_0_8569 | /**
* @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 {Expression, LiteralExpr, R3DependencyMetadata, WrappedNodeExpr} from '@angular/compiler';
import ts from 'ty... | {
"end_byte": 8569,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/di.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.ts_0_3731 | /**
* @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 {ViewEncapsulation} from '@angular/compiler';
import ts from 'typescript';
import {ErrorCode, FatalDiagnosti... | {
"end_byte": 3731,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.ts_0_8589 | /**
* @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 {
ErrorCode,
FatalDiagnosticError,
makeDiagnostic,
makeRelatedInformati... | {
"end_byte": 8589,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.ts_8591_17210 | function validateHostDirectiveMappings(
bindingType: 'input' | 'output',
hostDirectiveMeta: HostDirectiveMeta,
meta: DirectiveMeta,
origin: ts.Expression,
diagnostics: ts.DiagnosticWithLocation[],
requiredBindings: Set<ClassPropertyName> | null,
) {
if (!isHostDirectiveMetaForGlobalMode(hostDirectiveMeta)... | {
"end_byte": 17210,
"start_byte": 8591,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.ts_17212_18154 | /**
* Throws `FatalDiagnosticError` with error code `LOCAL_COMPILATION_UNRESOLVED_CONST`
* if the compilation mode is local and the value is not resolved due to being imported
* from external files. This is a common scenario for errors in local compilation mode,
* and so this helper can be used to quickly generate ... | {
"end_byte": 18154,
"start_byte": 17212,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/util.ts_0_8056 | /**
* @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 {
Expression,
ExternalExpr,
FactoryTarget,
ParseLocation,
ParseSourceFile,
ParseSourceSpan,
R3C... | {
"end_byte": 8056,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/util.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/util.ts_8058_16136 | export function readBaseClass(
node: ClassDeclaration,
reflector: ReflectionHost,
evaluator: PartialEvaluator,
): Reference<ClassDeclaration> | 'dynamic' | null {
const baseExpression = reflector.getBaseClassExpression(node);
if (baseExpression !== null) {
const baseClass = evaluator.evaluate(baseExpressi... | {
"end_byte": 16136,
"start_byte": 8058,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/util.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/jit_declaration_registry.ts_0_507 | /**
* @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 {ClassDeclaration} from '../../../reflection';
/**
* Registry that keeps track of Angular declarations that... | {
"end_byte": 507,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/jit_declaration_registry.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.ts_0_7992 | /**
* @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 {
ArrowFunctionExpr,
Expression,
LiteralArrayExpr,
LiteralExpr,
literalMap,
R3ClassMetadata,
Wr... | {
"end_byte": 7992,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/README.md_0_362 | # What is the 'annotations/directive' package?
This package implements the `DirectiveDecoratorHandler`, which processes and compiles `@Directive`-decorated classes.
Directive compilation is also the base of component compilation, and so this package exports a number of utilities related to directive compilation for t... | {
"end_byte": 362,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/README.md"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/BUILD.bazel_0_940 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "directive",
srcs = ["index.ts"] + glob([
"src/**/*.ts",
]),
deps = [
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/annotations/common",
"//pa... | {
"end_byte": 940,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/index.ts_0_536 | /**
* @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 {DirectiveDecoratorHandler} from './src/handler';
export {DirectiveSymbol} from './src/symbol';
export * from... | {
"end_byte": 536,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/test/directive_spec.ts_0_7823 | /**
* @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 {
CssSelector,
DirectiveMeta as T2DirectiveMeta,
parseTemplate,
R3TargetBinder,
SelectorMatcher,
T... | {
"end_byte": 7823,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/test/directive_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/test/BUILD.bazel_0_1210 | 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": 1210,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/test/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/test/initializer_functions_spec.ts_0_875 | /*!
* @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 {ErrorCode, FatalDiagnosticError} from '../../../diagnostics';
import {absolute... | {
"end_byte": 875,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/test/initializer_functions_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/test/initializer_functions_spec.ts_877_9484 | runInEachFileSystem(() => {
const modelApi: InitializerApiFunction = {
functionName: 'model',
owningModule: '@angular/core',
allowedAccessLevels: [ClassMemberAccessLevel.PublicWritable],
};
describe('initializer function detection', () => {
it('should identify a non-required function that is impo... | {
"end_byte": 9484,
"start_byte": 877,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/test/initializer_functions_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/test/initializer_functions_spec.ts_9488_15012 | describe('`validateAccessOfInitializerApiMember`', () => {
it('should report errors if a private field is used, but not allowed', () => {
const {member, reflector, importTracker} = setup(`
import {Directive, model} from '@angular/core';
@Directive()
class Dir {
private test ... | {
"end_byte": 15012,
"start_byte": 9488,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/test/initializer_functions_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/query_functions.ts_0_6254 | /**
* @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 {
createMayBeForwardRefExpression,
ForwardRefHandling,
MaybeForwardRefExpression,
outputAst as o,
R... | {
"end_byte": 6254,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/query_functions.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_output_parse_options.ts_0_1422 | /**
* @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 {ErrorCode, FatalDiagnosticError} from '../../../diagnostics';
import {reflectO... | {
"end_byte": 1422,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_output_parse_options.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts_0_3757 | /**
* @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 {
createMayBeForwardRefExpression,
emitDistinctChangesOnlyDefaultValue,
Expression,
ExternalExpr,
F... | {
"end_byte": 3757,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts_3758_11953 | {
let directive: Map<string, ts.Expression>;
if (decorator.args === null || decorator.args.length === 0) {
directive = new Map<string, ts.Expression>();
} else if (decorator.args.length !== 1) {
throw new FatalDiagnosticError(
ErrorCode.DECORATOR_ARITY_WRONG,
decorator.node,
`Incorrect n... | {
"end_byte": 11953,
"start_byte": 3758,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts_11957_17603 | if (compilationMode !== CompilationMode.LOCAL && hostDirectives !== null) {
// In global compilation mode where we do type checking, the template type-checker will need to
// import host directive types, so add them as referenced by `clazz`. This will ensure that
// libraries are required to export host dir... | {
"end_byte": 17603,
"start_byte": 11957,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts_17605_26822 | export function extractHostBindings(
members: ClassMember[],
evaluator: PartialEvaluator,
coreModule: string | undefined,
compilationMode: CompilationMode,
metadata?: Map<string, ts.Expression>,
): ParsedHostBindings {
let bindings: ParsedHostBindings;
if (metadata && metadata.has('host')) {
bindings ... | {
"end_byte": 26822,
"start_byte": 17605,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts_26824_33231 | function isStringArrayOrDie(value: any, name: string, node: ts.Expression): value is string[] {
if (!Array.isArray(value)) {
return false;
}
for (let i = 0; i < value.length; i++) {
if (typeof value[i] !== 'string') {
throw createValueHasWrongTypeError(
node,
value[i],
`Fail... | {
"end_byte": 33231,
"start_byte": 26824,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts_33233_38735 | function tryParseInputFieldMapping(
clazz: ClassDeclaration,
member: ClassMember,
evaluator: PartialEvaluator,
reflector: ReflectionHost,
importTracker: ImportedSymbolsTracker,
isCore: boolean,
refEmitter: ReferenceEmitter,
compilationMode: CompilationMode,
): InputMapping | null {
const classProperty... | {
"end_byte": 38735,
"start_byte": 33233,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts_38736_47807 | export function parseDecoratorInputTransformFunction(
clazz: ClassDeclaration,
classPropertyName: string,
value: DynamicValue | Reference,
reflector: ReflectionHost,
refEmitter: ReferenceEmitter,
compilationMode: CompilationMode,
): DecoratorInputTransform {
// In local compilation mode we can skip type c... | {
"end_byte": 47807,
"start_byte": 38736,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts_47809_56824 | /** Parses the class members that are outputs. */
function parseOutputFields(
clazz: ClassDeclaration,
classDecorator: Decorator,
members: ClassMember[],
isCore: boolean,
reflector: ReflectionHost,
importTracker: ImportedSymbolsTracker,
evaluator: PartialEvaluator,
outputsFromMeta: Record<string, string... | {
"end_byte": 56824,
"start_byte": 47809,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts_56825_58470 | function parseHostDirectivesMapping(
field: 'inputs' | 'outputs',
resolvedValue: ResolvedValue,
nameForErrors: string,
sourceExpression: ts.Expression,
): {[bindingPropertyName: string]: string} | null {
if (resolvedValue instanceof Map && resolvedValue.has(field)) {
const rawInputs = resolvedValue.get(fi... | {
"end_byte": 58470,
"start_byte": 56825,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.ts_0_2653 | /**
* @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 {InputMapping} from '.... | {
"end_byte": 2653,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.ts_0_5898 | /**
* @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 {
areTypeParametersEqual,
isArrayEqual,
isSetEqual,
isSymbolEqual,
SemanticSymbol,
SemanticTypePa... | {
"end_byte": 5898,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/model_function.ts_0_2588 | /**
* @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 {ModelMapping} from '.... | {
"end_byte": 2588,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/model_function.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_function_access.ts_0_1487 | /**
* @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 {ErrorCode, FatalDiagnosticError, makeDiagnosticChain} from '../../../diagnostics';
import {ClassMember} from... | {
"end_byte": 1487,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_function_access.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_functions.ts_0_6942 | /**
* @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 {ClassMemberAccessLeve... | {
"end_byte": 6942,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_functions.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.ts_0_2973 | /**
* @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 {
compileClassMetadata,
compileDeclareClassMetadata,
compileDeclareDirectiveFromMetadata,
compileDire... | {
"end_byte": 2973,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.ts_2975_12052 | export class DirectiveDecoratorHandler
implements DecoratorHandler<Decorator | null, DirectiveHandlerData, DirectiveSymbol, unknown>
{
constructor(
private reflector: ReflectionHost,
private evaluator: PartialEvaluator,
private metaRegistry: MetadataRegistry,
private scopeRegistry: LocalModuleScopeR... | {
"end_byte": 12052,
"start_byte": 2975,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.ts_12056_14438 | ompilePartial(
node: ClassDeclaration,
analysis: Readonly<DirectiveHandlerData>,
resolution: Readonly<unknown>,
): CompileResult[] {
const fac = compileDeclareFactory(toFactoryMetadata(analysis.meta, FactoryTarget.Directive));
const def = compileDeclareDirectiveFromMetadata(analysis.meta);
con... | {
"end_byte": 14438,
"start_byte": 12056,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/directive/src/output_function.ts_0_3165 | /**
* @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 {ErrorCode, FatalDiagnosticError} from '../../../diagnostics';
import {Imported... | {
"end_byte": 3165,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/directive/src/output_function.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/src/pipe.ts_0_8913 | /**
* @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 {
compileClassMetadata,
compileDeclareClassMetadata,
compileDeclarePipeFromMetadata,
compilePipeFromM... | {
"end_byte": 8913,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/src/pipe.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts_0_7607 | /**
* @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 {
compileClassMetadata,
CompileClassMetadataFn,
compileDeclareClassMetadata,
compileDeclareInjectable... | {
"end_byte": 7607,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts_7608_14793 | tractInjectableMetadata(
clazz: ClassDeclaration,
decorator: Decorator,
reflector: ReflectionHost,
): R3InjectableMetadata {
const name = clazz.name.text;
const type = wrapTypeReference(reflector, clazz);
const typeArgumentCount = reflector.getGenericArityOfClass(clazz) || 0;
if (decorator.args === null) ... | {
"end_byte": 14793,
"start_byte": 7608,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts"
} |
angular/packages/compiler-cli/src/ngtsc/testing/BUILD.bazel_0_599 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "testing",
testonly = True,
srcs = glob([
"**/*.ts",
]),
module_name = "@angular/compiler-cli/src/ngtsc/testing",
deps = [
"//packages:types",
"//packages... | {
"end_byte": 599,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/testing/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/testing/index.ts_0_392 | /**
* @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/utils';
export * from './src/cached_source_files';
export * from './src/compiler_host';
export *... | {
"end_byte": 392,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/testing/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/testing/fake_common/BUILD.bazel_0_406 | load("//tools:defaults.bzl", "ng_package", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "fake_common",
srcs = [
"index.ts",
],
module_name = "@angular/common",
deps = [
"//packages/core",
],
)
ng_package(
name = "npm_package",
... | {
"end_byte": 406,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/testing/fake_common/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/testing/fake_common/index.ts_0_3179 | /**
* @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 {
NgIterable,
TemplateRef,
TrackByFunction,
ɵɵDirectiveDeclaration,
ɵɵNgModuleDeclaration,
ɵɵPipe... | {
"end_byte": 3179,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/testing/fake_common/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/testing/src/mock_file_loading.ts_0_4495 | /**
* @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 {readdirSync, readFileSync, statSync} from 'fs';
import {resolve} from 'path';... | {
"end_byte": 4495,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/testing/src/mock_file_loading.ts"
} |
angular/packages/compiler-cli/src/ngtsc/testing/src/runfile_helpers.ts_0_1743 | /**
* @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 {runfiles} from '@bazel/runfiles';
import * as fs from 'fs';
import * as path ... | {
"end_byte": 1743,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/testing/src/runfile_helpers.ts"
} |
angular/packages/compiler-cli/src/ngtsc/testing/src/cached_source_files.ts_0_1860 | /**
* @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 {basename} from '../../file_system';
// A cache of source files that are typic... | {
"end_byte": 1860,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/testing/src/cached_source_files.ts"
} |
angular/packages/compiler-cli/src/ngtsc/testing/src/utils.ts_0_6237 | /**
* @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="jasmine"/>
import ts from 'typescript';
import {
AbsoluteFsPath,
dirname,
getFileSystem... | {
"end_byte": 6237,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/testing/src/utils.ts"
} |
angular/packages/compiler-cli/src/ngtsc/testing/src/compiler_host.ts_0_865 | /**
* @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 {NgtscCompilerHost} from '../../file_system';
import {getCachedSourceFile} from ... | {
"end_byte": 865,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/testing/src/compiler_host.ts"
} |
angular/packages/compiler-cli/src/ngtsc/sourcemaps/README.md_0_82 | # Source-map handling
Here there are classes for loading and merging source-maps. | {
"end_byte": 82,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/sourcemaps/README.md"
} |
angular/packages/compiler-cli/src/ngtsc/sourcemaps/BUILD.bazel_0_485 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "sourcemaps",
srcs = ["index.ts"] + glob([
"src/**/*.ts",
]),
deps = [
"//packages/compiler-cli/src/ngtsc/file_system",
"//packages/compiler-cli/src/ngtsc/logging... | {
"end_byte": 485,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/sourcemaps/BUILD.bazel"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.