_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
angular/packages/compiler-cli/src/ngtsc/scope/src/component_scope.ts_0_1265 | /**
* @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';
import {ComponentScope, ComponentScopeReader, LocalModuleScope, R... | {
"end_byte": 1265,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/component_scope.ts"
} |
angular/packages/compiler-cli/src/ngtsc/scope/src/dependency.ts_0_5634 | /**
* @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 {AliasingHost, Reference} from '../../imports';
import {DirectiveMeta, Metadata... | {
"end_byte": 5634,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/dependency.ts"
} |
angular/packages/compiler-cli/src/ngtsc/scope/src/api.ts_0_2620 | /**
* @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 {SchemaMetadata} from '@angular/compiler';
import {Reexport, Reference} from '../../imports';
import {Direct... | {
"end_byte": 2620,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/api.ts"
} |
angular/packages/compiler-cli/src/ngtsc/scope/src/local.ts_0_2429 | /**
* @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 {ExternalExpr} from '@angular/compiler';
import ts from 'typescript';
import {ErrorCode, makeDiagnostic, mak... | {
"end_byte": 2429,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/local.ts"
} |
angular/packages/compiler-cli/src/ngtsc/scope/src/local.ts_2430_9481 | export class LocalModuleScopeRegistry implements MetadataRegistry, ComponentScopeReader {
/**
* Tracks whether the registry has been asked to produce scopes for a module or component. Once
* this is true, the registry cannot accept registrations of new directives/pipes/modules as it
* would invalidate the ca... | {
"end_byte": 9481,
"start_byte": 2430,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/local.ts"
} |
angular/packages/compiler-cli/src/ngtsc/scope/src/local.ts_9484_17391 | private getScopeOfModuleReference(ref: Reference<ClassDeclaration>): LocalModuleScope | null {
if (this.cache.has(ref.node)) {
const cachedValue = this.cache.get(ref.node);
if (cachedValue !== IN_PROGRESS_RESOLUTION) {
return cachedValue as LocalModuleScope | null;
}
}
this.cache... | {
"end_byte": 17391,
"start_byte": 9484,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/local.ts"
} |
angular/packages/compiler-cli/src/ngtsc/scope/src/local.ts_17396_26090 | for (const decl of ngModule.exports) {
// Attempt to resolve decl as an NgModule.
const exportScope = this.getExportedScope(decl, diagnostics, ref.node, 'export');
if (
exportScope === 'invalid' ||
exportScope === 'cycle' ||
(exportScope !== null && exportScope.exported.isPoiso... | {
"end_byte": 26090,
"start_byte": 17396,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/local.ts"
} |
angular/packages/compiler-cli/src/ngtsc/scope/src/local.ts_26091_30997 | function invalidRef(
decl: Reference<ClassDeclaration>,
rawExpr: ts.Expression | null,
type: 'import' | 'export',
): ts.Diagnostic {
const code =
type === 'import' ? ErrorCode.NGMODULE_INVALID_IMPORT : ErrorCode.NGMODULE_INVALID_EXPORT;
const resolveTarget = type === 'import' ? 'NgModule' : 'NgModule, Com... | {
"end_byte": 30997,
"start_byte": 26091,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/local.ts"
} |
angular/packages/compiler-cli/src/ngtsc/scope/src/util.ts_0_3648 | /**
* @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, makeDiagnostic, makeRelatedInformation} from '../../diagnostics';
i... | {
"end_byte": 3648,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/util.ts"
} |
angular/packages/compiler-cli/src/ngtsc/scope/src/typecheck.ts_0_5512 | /**
* @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, SchemaMetadata, SelectorMatcher} from '@angular/compiler';
import ts from 'typescript';
import... | {
"end_byte": 5512,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/typecheck.ts"
} |
angular/packages/compiler-cli/src/ngtsc/scope/src/standalone.ts_0_4789 | /**
* @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 {DirectiveMeta, MetadataReader, NgModuleMeta, PipeMeta} from '../../... | {
"end_byte": 4789,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/scope/src/standalone.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/README.md_0_7203 | # `imports`
The `imports` module attempts to unify all import handling in ngtsc. It powers the compiler's reference system - how the compiler tracks classes like components, directives, NgModules, etc, and how it generates imports to them in user code. At its heart is the `Reference` abstraction, which combines a clas... | {
"end_byte": 7203,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/README.md"
} |
angular/packages/compiler-cli/src/ngtsc/imports/README.md_7203_14817 | ## ReferenceEmitter
During evaluation of `ts.Expression`s, `Reference`s to specific directives/pipes/etc are created. During code generation, imports need to be generated for a particular component's template function, based on these `Reference`s. This job falls to the `ReferenceEmitter`.
A `ReferenceEmitter` takes a... | {
"end_byte": 14817,
"start_byte": 7203,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/README.md"
} |
angular/packages/compiler-cli/src/ngtsc/imports/README.md_14817_17747 | ## Default imports
This aspect of the `imports` package is a little different than the rest of the code as it's not concerned with directive/pipe imports. Instead, it's concerned with a different problem: preventing the removal of default import statements which were converted from type-only to value imports through c... | {
"end_byte": 17747,
"start_byte": 14817,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/README.md"
} |
angular/packages/compiler-cli/src/ngtsc/imports/BUILD.bazel_0_606 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "imports",
srcs = ["index.ts"] + glob([
"src/*.ts",
]),
deps = [
"//packages:types",
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/core:api",
... | {
"end_byte": 606,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/imports/index.ts_0_1401 | /**
* @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 {
AliasingHost,
AliasStrategy,
PrivateExportAliasingHost,
UnifiedModulesAliasingHost,
} from './src/a... | {
"end_byte": 1401,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/test/emitter_spec.ts_0_6928 | /**
* @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 {ExternalExpr} from '@angular/compiler';
import ts from 'typescript';
import {UnifiedModulesHost} from '../..... | {
"end_byte": 6928,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/test/emitter_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/test/emitter_spec.ts_6932_16105 | describe('LogicalProjectStrategy', () => {
it('should enumerate exports with the ReflectionHost', () => {
// Use a modified ReflectionHost that prefixes all export names that it enumerates.
class TestHost extends TypeScriptReflectionHost {
override getExportsOfModule(node: ts.Node): Map<string, ... | {
"end_byte": 16105,
"start_byte": 6932,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/test/emitter_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/test/default_spec.ts_0_4003 | /**
* @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} from '../../file_system';
import {runInEachFileSystem} from '../.... | {
"end_byte": 4003,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/test/default_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/test/BUILD.bazel_0_803 | 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": 803,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/test/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/deferred_symbol_tracker.ts_0_7840 | /**
* @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 {ClassDeclaration} from '../../reflection';
import {getContainingImportDeclarat... | {
"end_byte": 7840,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/deferred_symbol_tracker.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/reexport.ts_0_297 | /**
* @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 interface Reexport {
symbolName: string;
asAlias: string;
fromModule: string;
}
| {
"end_byte": 297,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/reexport.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/patch_alias_reference_resolution.ts_0_7352 | /**
* @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';
/** Possible alias import declarations */
export type AliasImportDeclaration = ts.Impo... | {
"end_byte": 7352,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/patch_alias_reference_resolution.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/emitter.ts_0_8233 | /**
* @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, ExternalReference, WrappedNodeExpr} from '@angular/compiler';
import ts from 'types... | {
"end_byte": 8233,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/emitter.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/emitter.ts_8234_15462 | export class LocalIdentifierStrategy implements ReferenceEmitStrategy {
emit(ref: Reference, context: ts.SourceFile, importFlags: ImportFlags): EmittedReference | null {
const refSf = getSourceFile(ref.node);
// If the emitter has specified ForceNewImport, then LocalIdentifierStrategy should not use a
//... | {
"end_byte": 15462,
"start_byte": 8234,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/emitter.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/emitter.ts_15463_20012 | export class LogicalProjectStrategy implements ReferenceEmitStrategy {
private relativePathStrategy: RelativePathStrategy;
constructor(
private reflector: ReflectionHost,
private logicalFs: LogicalFileSystem,
) {
this.relativePathStrategy = new RelativePathStrategy(this.reflector);
}
emit(
r... | {
"end_byte": 20012,
"start_byte": 15463,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/emitter.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/find_export.ts_0_1163 | /**
* @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 {ReflectionHost} from '../../reflection';
import {isNamedDeclaration} from '../... | {
"end_byte": 1163,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/find_export.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/resolver.ts_0_1361 | /**
* @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} from '../../file_system';
import {getSourceFileOrNull, resolveMod... | {
"end_byte": 1361,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/resolver.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/default.ts_0_4645 | /**
* @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 {WrappedNodeExpr} from '@angular/compiler';
import ts from 'typescript';
import {getSourceFile} from '../../... | {
"end_byte": 4645,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/default.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/local_compilation_extra_imports_tracker.ts_0_4699 | /**
* @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 {getContainingImportDeclaration} from '../../reflection/src/typescript';
/**
... | {
"end_byte": 4699,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/local_compilation_extra_imports_tracker.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/core.ts_0_3518 | /**
* @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 {relativePathBetween} from '../../util/src/path';
/**
* Rewrites imports of symbols being written into gene... | {
"end_byte": 3518,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/core.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/references.ts_0_6217 | /**
* @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} from '@angular/compiler';
import ts from 'typescript';
import {AmbientImport} from '../../refle... | {
"end_byte": 6217,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/references.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/alias.ts_0_6936 | /**
* @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} from '@angular/compiler';
import ts from 'typescript';
import {UnifiedModulesHost... | {
"end_byte": 6936,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/alias.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/alias.ts_6937_9698 | xport class PrivateExportAliasingHost implements AliasingHost {
constructor(private host: ReflectionHost) {}
/**
* Under private export aliasing, the `AbsoluteModuleStrategy` used for emitting references will
* will select aliased exports that it finds in the .d.ts file for an NgModule's file. Thus,
* emi... | {
"end_byte": 9698,
"start_byte": 6937,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/alias.ts"
} |
angular/packages/compiler-cli/src/ngtsc/imports/src/imported_symbols_tracker.ts_0_5286 | /*!
* @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';
/**
* A map of imported symbols to local names under which the symbols are available ... | {
"end_byte": 5286,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/imports/src/imported_symbols_tracker.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/BUILD.bazel_0_634 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
# Compiler code pertaining to extracting data for generating API reference documentation.
ts_library(
name = "docs",
srcs = ["index.ts"] + glob([
"src/**/*.ts",
]),
module_name = "@angular/compiler... | {
"end_byte": 634,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/docs/index.ts_0_292 | /**
* @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 {DocEntry} from './src/entities';
export {DocsExtractor} from './src/extractor';
| {
"end_byte": 292,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.ts_0_5005 | /**
* @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 {EntryType, FunctionEntry, ParameterEntry} from './entities';
import {extractGe... | {
"end_byte": 5005,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/enum_extractor.ts_0_2153 | /**
* @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 {
EntryType,
EnumEntry,
EnumMemberEntry,
MemberType,
} from '@angular/compiler-cli/src/ngtsc/docs/src... | {
"end_byte": 2153,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/enum_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/filters.ts_0_420 | /**
* @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
*/
/** Gets whether a symbol's name indicates it is an Angular-private API. */
export function isAngularPrivateName(nam... | {
"end_byte": 420,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/filters.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/constant_extractor.ts_0_4346 | /**
* @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 {ConstantEntry, EntryType, EnumEntry, EnumMemberEntry, MemberType} from './enti... | {
"end_byte": 4346,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/constant_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/initializer_api_function_extractor.ts_0_7119 | /**
* @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 {
EntryType,
FunctionDefinitionEntry,
InitializerApiFunctionEntry,
JsDo... | {
"end_byte": 7119,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/initializer_api_function_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/entities.ts_0_5854 | /**
* @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
*/
/** The JSON data file format for extracted API reference info. */
export interface EntryCollection {
moduleName: ... | {
"end_byte": 5854,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/entities.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/generics_extractor.ts_0_772 | /**
* @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 {GenericEntry} from './entities';
type DeclarationWithTypeParams = {
typePar... | {
"end_byte": 772,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/generics_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/import_extractor.ts_0_1364 | /**
* @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';
/**
* For a given SourceFile, it extracts all imported symbols from other Angular pac... | {
"end_byte": 1364,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/import_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/jsdoc_extractor.ts_0_3420 | /**
* @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 {JsDocTagEntry} from './entities';
/**
* RegExp to match the `@` character fo... | {
"end_byte": 3420,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/jsdoc_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/type_extractor.ts_0_457 | /**
* @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';
/** Gets the string representation of a node's resolved type. */
export function extra... | {
"end_byte": 457,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/type_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/type_alias_extractor.ts_0_981 | /**
* @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 {EntryType} from './entities';
import {extractJsDocDescription, extractJsDocTags... | {
"end_byte": 981,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/type_alias_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/extractor.ts_0_8060 | /**
* @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 {MetadataReader} from '../../metadata';
import {isNamedClassDeclaration, TypeSc... | {
"end_byte": 8060,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/decorator_extractor.ts_0_5829 | /**
* @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 {extractInterface} from './class_extractor';
import {DecoratorEntry, DecoratorT... | {
"end_byte": 5829,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/decorator_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.ts_0_2204 | /**
* @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 {Reference} from '../../imports';
import {
DirectiveMeta,
InputMapping,
I... | {
"end_byte": 2204,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.ts_2205_11747 | class ClassExtractor {
constructor(
protected declaration: ClassDeclaration & ClassDeclarationLike,
protected typeChecker: ts.TypeChecker,
) {}
/** Extract docs info specific to classes. */
extract(): ClassEntry {
return {
name: this.declaration.name.text,
isAbstract: this.isAbstract(),... | {
"end_byte": 11747,
"start_byte": 2205,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.ts_11751_19206 | /**
* Gets whether a given class member should be excluded from public API docs.
* This is the case if:
* - The member does not have a name
* - The member is neither a method nor property
* - The member is private
* - The member has a name that marks it as Angular-internal.
* - The member is m... | {
"end_byte": 19206,
"start_byte": 11751,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.ts"
} |
angular/packages/compiler-cli/src/ngtsc/docs/src/internal.ts_0_1070 | /**
* @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 {extractJsDocTags} from './jsdoc_extractor';
/**
* Check if the member has a ... | {
"end_byte": 1070,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/docs/src/internal.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/BUILD.bazel_0_434 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "translator",
srcs = glob(["**/*.ts"]),
deps = [
"//packages:types",
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/imports",
"//packages/compiler-... | {
"end_byte": 434,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/translator/index.ts_0_1165 | /**
* @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 {
AstFactory,
BinaryOperator,
LeadingComment,
ObjectLiteralProperty,
SourceMapLocation,
SourceMap... | {
"end_byte": 1165,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/test/import_manager_spec.ts_0_8729 | /**
* @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} from '../../file_system';
import {initMockFileSystem} from '../.... | {
"end_byte": 8729,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/test/import_manager_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/test/import_manager_spec.ts_8733_17486 | it('should not re-use an original namespace import if re-use is disabled', () => {
const {testFile, emit} = createTestProgram(`
import * as existingCore from '@angular/core';
`);
const manager = new ImportManager({
disableOriginalSourceFileReuse: true,
});
const outputRef = manager.addI... | {
"end_byte": 17486,
"start_byte": 8733,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/test/import_manager_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/test/import_manager_spec.ts_17490_25741 | it('should re-use previous similar generated imports', () => {
const {testFile, emit} = createTestProgram(``);
const manager = new ImportManager();
const inputRef = manager.addImport({
exportModuleSpecifier: '@angular/core',
exportSymbolName: 'input',
requestedFile: testFile,
});
... | {
"end_byte": 25741,
"start_byte": 17490,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/test/import_manager_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/test/import_manager_spec.ts_25745_30732 | it('should remove all pre-existing instances of a specific import', () => {
const {testFile, emit} = createTestProgram(`
import { input, input as foo } from '@angular/core';
import { input as bar } from '@angular/core';
input();
foo();
bar();
`);
const manager = new ImportManag... | {
"end_byte": 30732,
"start_byte": 25745,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/test/import_manager_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/test/BUILD.bazel_0_696 | 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": 696,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/test/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/translator/test/typescript_ast_factory_spec.ts_0_390 | /**
* @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 {leadingComment} from '@angular/compiler';
import ts from 'typescript';
import {TypeScriptAstFactory} from '.... | {
"end_byte": 390,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/test/typescript_ast_factory_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/test/typescript_ast_factory_spec.ts_391_8364 | {
let factory: TypeScriptAstFactory;
beforeEach(() => (factory = new TypeScriptAstFactory(/* annotateForClosureCompiler */ false)));
describe('attachComments()', () => {
it('should add the comments to the given statement', () => {
const {
items: [stmt],
generate,
} = setupStatemen... | {
"end_byte": 8364,
"start_byte": 391,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/test/typescript_ast_factory_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/test/typescript_ast_factory_spec.ts_8368_16723 | describe('createArrowFunctionExpression()', () => {
it('should create an arrow function with an implicit return if a single statement is provided', () => {
const {
items: [body],
generate,
} = setupExpressions('arg2 + arg1');
const fn = factory.createArrowFunctionExpression(['arg1'... | {
"end_byte": 16723,
"start_byte": 8368,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/test/typescript_ast_factory_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/test/typescript_ast_factory_spec.ts_16727_19129 | describe('setSourceMapRange()', () => {
it('should attach the `sourceMapRange` to the given `node`', () => {
const {
items: [expr],
} = setupExpressions(`42`);
factory.setSourceMapRange(expr, {
start: {line: 0, column: 1, offset: 1},
end: {line: 2, column: 3, offset: 15},
... | {
"end_byte": 19129,
"start_byte": 16727,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/test/typescript_ast_factory_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/translator.ts_0_1688 | /**
* @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 * as o from '@angular/compiler';
import {
AstFactory,
BinaryOperator,
ObjectLiteralProperty,
SourceMa... | {
"end_byte": 1688,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/translator.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/translator.ts_1690_10567 | export class ExpressionTranslatorVisitor<TFile, TStatement, TExpression>
implements o.ExpressionVisitor, o.StatementVisitor
{
private downlevelTaggedTemplates: boolean;
private downlevelVariableDeclarations: boolean;
private recordWrappedNode: RecordWrappedNodeFn<TExpression>;
constructor(
private factor... | {
"end_byte": 10567,
"start_byte": 1690,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/translator.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/translator.ts_10571_18265 | visitExternalExpr(ast: o.ExternalExpr, _context: Context): TExpression {
if (ast.value.name === null) {
if (ast.value.moduleName === null) {
throw new Error('Invalid import without name nor moduleName');
}
return this.imports.addImport({
exportModuleSpecifier: ast.value.moduleName,... | {
"end_byte": 18265,
"start_byte": 10571,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/translator.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/context.ts_0_651 | /**
* @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
*/
/**
* The current context of a translator visitor as it traverses the AST tree.
*
* It tracks whether we are in t... | {
"end_byte": 651,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/context.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/ts_util.ts_0_822 | /*!
* @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';
/**
* Creates a TypeScript node representing a numeric value.
*/
export function tsN... | {
"end_byte": 822,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/ts_util.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/typescript_translator.ts_0_1508 | /**
* @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 * as o from '@angular/compiler';
import ts from 'typescript';
import {ImportGenerator} from './api/import_ge... | {
"end_byte": 1508,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/typescript_translator.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.ts_0_2165 | /**
* @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 {
AstFactory,
BinaryOperator,
LeadingComment,
ObjectLiteralProperty,
S... | {
"end_byte": 2165,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.ts_2166_11255 | export class TypeScriptAstFactory implements AstFactory<ts.Statement, ts.Expression> {
private externalSourceFiles = new Map<string, ts.SourceMapSource>();
constructor(private annotateForClosureCompiler: boolean) {}
attachComments = attachComments;
createArrayLiteral = ts.factory.createArrayLiteralExpression... | {
"end_byte": 11255,
"start_byte": 2166,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.ts_11257_12126 | /**
* Attach the given `leadingComments` to the `statement` node.
*
* @param statement The statement that will have comments attached.
* @param leadingComments The comments to attach to the statement.
*/
export function attachComments(
statement: ts.Statement | ts.Expression,
leadingComments: LeadingComment[],... | {
"end_byte": 12126,
"start_byte": 11257,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/type_translator.ts_0_971 | /**
* @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 * as o from '@angular/compiler';
import ts from 'typescript';
import {
assertSuccessfulReferenceEmit,
Im... | {
"end_byte": 971,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/type_translator.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/type_translator.ts_973_9489 | class TypeTranslatorVisitor implements o.ExpressionVisitor, o.TypeVisitor {
constructor(
private imports: ImportManager,
private contextFile: ts.SourceFile,
private reflector: ReflectionHost,
private refEmitter: ReferenceEmitter,
) {}
visitBuiltinType(type: o.BuiltinType, context: Context): ts.Ke... | {
"end_byte": 9489,
"start_byte": 973,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/type_translator.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/type_translator.ts_9493_11541 | private translateType(type: o.Type, context: Context): ts.TypeNode {
const typeNode = type.visitType(this, context);
if (!ts.isTypeNode(typeNode)) {
throw new Error(
`A Type must translate to a TypeNode, but was ${ts.SyntaxKind[typeNode.kind]}`,
);
}
return typeNode;
}
private t... | {
"end_byte": 11541,
"start_byte": 9493,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/type_translator.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/type_emitter.ts_0_6987 | /**
* @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';
/**
* A type reference resolver function is responsible for translating a type referen... | {
"end_byte": 6987,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/type_emitter.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/import_manager/reuse_source_file_imports.ts_0_5930 | /**
* @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 {AliasImportDeclaration} from '../../../imports';
import {ImportRequest} from '... | {
"end_byte": 5930,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/import_manager/reuse_source_file_imports.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/import_manager/check_unique_identifier_name.ts_0_1882 | /**
* @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 type {ImportManagerConfig} from './import_manager';
/** Extension of `ts.Sourc... | {
"end_byte": 1882,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/import_manager/check_unique_identifier_name.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/import_manager/reuse_generated_imports.ts_0_2937 | /**
* @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 {ImportRequest} from '../api/import_generator';
import type {ModuleName} from ... | {
"end_byte": 2937,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/import_manager/reuse_generated_imports.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_typescript_transform.ts_0_4638 | /**
* @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 {loadIsReferencedAliasDeclarationPatch} from '../../../imports';
import type {... | {
"end_byte": 4638,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_typescript_transform.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_manager.ts_0_2338 | /**
* @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 {AliasImportDeclaration, ImportRewriter} from '../../../imports';
import {Impor... | {
"end_byte": 2338,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_manager.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_manager.ts_2339_11302 | export class ImportManager
implements ImportGenerator<ts.SourceFile, ts.Identifier | ts.PropertyAccessExpression>
{
/** List of new imports that will be inserted into given source files. */
private newImports: Map<
ts.SourceFile,
{
namespaceImports: Map<ModuleName, ts.NamespaceImport>;
namedIm... | {
"end_byte": 11302,
"start_byte": 2339,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_manager.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_manager.ts_11305_19356 | finalize(): {
affectedFiles: Set<string>;
updatedImports: Map<ts.NamedImports, ts.NamedImports>;
newImports: Map<string, ts.ImportDeclaration[]>;
reusedOriginalAliasDeclarations: Set<AliasImportDeclaration>;
deletedImports: Set<ts.ImportDeclaration>;
} {
const affectedFiles = new Set<string>()... | {
"end_byte": 19356,
"start_byte": 11305,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_manager.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/api/ast_factory.ts_0_627 | /**
* @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
*/
/**
* Used to create transpiler specific AST nodes from Angular Output AST nodes in an abstract way.
*
* Note tha... | {
"end_byte": 627,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/api/ast_factory.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/api/ast_factory.ts_628_8865 | {
/**
* Attach the `leadingComments` to the given `statement` node.
*
* @param statement the statement where the comments are to be attached.
* @param leadingComments the comments to attach.
*/
attachComments(statement: TStatement | TExpression, leadingComments: LeadingComment[]): void;
/**
* C... | {
"end_byte": 8865,
"start_byte": 628,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/api/ast_factory.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/api/ast_factory.ts_8869_11753 | /**
* Attach a source map range to the given node.
*
* @param node the node to which the range should be attached.
* @param sourceMapRange the range to attach to the node, or null if there is no range to attach.
* @returns the `node` with the `sourceMapRange` attached.
*/
setSourceMapRange<T extends... | {
"end_byte": 11753,
"start_byte": 8869,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/api/ast_factory.ts"
} |
angular/packages/compiler-cli/src/ngtsc/translator/src/api/import_generator.ts_0_1696 | /**
* @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 request to import a given symbol from the given module.
*/
export interface ImportRequest<TFile> {
/**
... | {
"end_byte": 1696,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/translator/src/api/import_generator.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/README.md_0_1812 | # What is the 'annotations' package?
This package implements compilation of Angular-annotated classes - those with `@Component`, `@NgModule`, etc. decorators. (Note that the compiler uses 'decorator' and 'annotation' interchangeably, despite them having slightly different semantics).
The 'transform' package of the co... | {
"end_byte": 1812,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/README.md"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/BUILD.bazel_0_1660 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "annotations",
srcs = ["index.ts"] + glob([
"src/**/*.ts",
]),
deps = [
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/annotations/common",
"//... | {
"end_byte": 1660,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/index.ts_0_1055 | /**
* @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" />
export {
forwardRefResolver,
getAngularDecorators,
isAngularDecorator,
NoopR... | {
"end_byte": 1055,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/test/BUILD.bazel_0_1369 | 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": 1369,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/test/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/test/injectable_spec.ts_0_4147 | /**
* @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 {InjectableClassRegistry} from '../../annotations/common';
import {ErrorCode, FatalDiagnosticError, ngErrorCod... | {
"end_byte": 4147,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/test/injectable_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/README.md_0_315 | # What is the 'annotations/ng_module' package?
This package implements the `NgModuleDecoratorHandler`, which processes and compiles `@NgModule`-decorated classes.
It's separated out because other `DecoratorHandler`s interact with the `NgModuleSymbol` to implement the incremental compilation semantics of Angular. | {
"end_byte": 315,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/README.md"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/BUILD.bazel_0_1050 | load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "ng_module",
srcs = ["index.ts"] + glob([
"src/**/*.ts",
]),
deps = [
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/annotations/common",
"//pa... | {
"end_byte": 1050,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/BUILD.bazel"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/index.ts_0_424 | /**
* @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 {NgModuleDecoratorHandler, NgModuleSymbol} from './src/handler';
export {
createModuleWithProvidersResolver... | {
"end_byte": 424,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/index.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/test/ng_module_spec.ts_0_3330 | /**
* @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 {R3NgModuleMetadataGlobal, WrappedNodeExpr} from '@angular/compiler';
import {R3Reference} from '@angular/comp... | {
"end_byte": 3330,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/test/ng_module_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/test/ng_module_spec.ts_3332_11119 | runInEachFileSystem(() => {
describe('NgModuleDecoratorHandler', () => {
const _ = absoluteFrom;
it('should resolve forwardRef', () => {
const {program} = makeProgram([
{
name: _('/node_modules/@angular/core/index.d.ts'),
contents: `
export const Component: any;
... | {
"end_byte": 11119,
"start_byte": 3332,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/test/ng_module_spec.ts"
} |
angular/packages/compiler-cli/src/ngtsc/annotations/ng_module/test/BUILD.bazel_0_1153 | 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": 1153,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/src/ngtsc/annotations/ng_module/test/BUILD.bazel"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.