_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
angular/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts_323720_326106 | `,
);
env.driveMain();
const jsContents = env.getContents('test.js');
expect(jsContents).toContain('i0.ɵɵdefineInjector({ imports: [StandaloneCmp] })');
});
it('should filter directives & pipes out of NgModule.imports', () => {
env.write(
'test.ts',
... | {
"end_byte": 326106,
"start_byte": 323720,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts_326112_334379 | ntents).toContain('static ngAcceptInputType_value: boolean | string;');
});
it('should compile a component input with a transform function', () => {
env.write(
'/test.ts',
`
import {Component, Input} from '@angular/core';
function toNumber(value: boolean | s... | {
"end_byte": 334379,
"start_byte": 326112,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts_334387_342795 | ngAcceptInputType_value: boolean | string;');
});
it('should treat an input transform function only with a `this` parameter as unknown', () => {
env.write(
'/test.ts',
`
import {Directive, Input} from '@angular/core';
function toNumber(this: Dir) { return 1... | {
"end_byte": 342795,
"start_byte": 334387,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_0_428 | /**
* @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 {runInEachFileSystem} from '../../src/ngtsc/file_system/testing';
import {loadStandardTestFiles} from '../../... | {
"end_byte": 428,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_430_9543 | runInEachFileSystem(() => {
describe('ngtsc incremental compilation (semantic changes)', () => {
let env!: NgtscTestEnvironment;
beforeEach(() => {
env = NgtscTestEnvironment.setup(testFiles);
env.enableMultipleCompilations();
env.tsconfig();
});
function expectToHaveWritten(files:... | {
"end_byte": 9543,
"start_byte": 430,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_9551_17566 | it('should recompile components for which a directive usage is removed', () => {
// Testing setup: Cmp is a component with a template that matches a directive Dep with the
// initial selector '[dep]'.
//
// During the test, Dep's selector is changed, causing it to no longer match the tem... | {
"end_byte": 17566,
"start_byte": 9551,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_17574_25759 | it('should recompile dependent components when an output is added', () => {
// Testing setup: Cmp is a component with a template that matches a directive Dep with the
// initial selector '[dep]'.
//
// During the test, an output of Dep is added, and the test verifies that Cmp is re-emitt... | {
"end_byte": 25759,
"start_byte": 17574,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_25767_30672 | it('should recompile components when a pipe is newly matched because it was renamed', () => {
// Testing setup: Cmp uses two pipes (PipeA and PipeB) in its template.
//
// During the test, the selectors of these pipes are swapped. This ensures that Cmp's
// template is still valid, since... | {
"end_byte": 30672,
"start_byte": 25767,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_30678_35909 | describe('external declarations', () => {
it('should not recompile components that use external declarations that are not changed', () => {
// Testing setup: Two components (MyCmpA and MyCmpB) both depend on an external directive
// which matches their templates, via an NgModule import.
//... | {
"end_byte": 35909,
"start_byte": 30678,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_35915_44696 | mbol identity', () => {
it('should recompile components when their declaration name changes', () => {
// Testing setup: component Cmp depends on component Dep, which is directly exported.
//
// During the test, Dep's name is changed while keeping its public API the same. The test
/... | {
"end_byte": 44696,
"start_byte": 35915,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_44704_51160 | ot recompile components when a directive is changed into a component', () => {
env.write(
'cmp-user.ts',
`
import {Component} from '@angular/core';
@Component({
selector: 'cmp-user',
template: '<div dep></div>',
standalone: false,
... | {
"end_byte": 51160,
"start_byte": 44704,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_51166_58374 | mote scoping', () => {
it('should not recompile an NgModule nor component when remote scoping is unaffected', () => {
// Testing setup: MyCmpA and MyCmpB are two components with an indirect import cycle. That
// is, each component consumes the other in its template. This forces the compiler to use... | {
"end_byte": 58374,
"start_byte": 51166,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_58382_64908 | ecompile an NgModule when a remotely scoped component's scope is changed", () => {
// Testing setup: MyCmpA and MyCmpB are two components that each consume the other in
// their template, forcing the compiler to utilize remote scoping for MyCmpB (which is
// verified). Dir is a directive which i... | {
"end_byte": 64908,
"start_byte": 58382,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_64914_73574 | Module declarations', () => {
it('should recompile components when a matching directive is added in the direct scope', () => {
// Testing setup: A component Cmp has a template which would match a directive Dir,
// except Dir is not included in Cmp's NgModule.
//
// During the test,... | {
"end_byte": 73574,
"start_byte": 64914,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts_73582_80846 | ot recompile components when a non-matching directive is added in scope', () => {
// Testing setup: A component Cmp has a template which does not match a directive Dir,
// and Dir is not included in Cmp's NgModule.
//
// During the test, Dir is added to the NgModule, making it visible in... | {
"end_byte": 80846,
"start_byte": 73582,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_semantic_changes_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/defer_spec.ts_0_3256 | /**
* @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, ngErrorCode} from '@angular/compiler-cli/src/ngtsc/diagnostics';
import {runInEachFileSystem} fr... | {
"end_byte": 3256,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/defer_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/defer_spec.ts_3262_12055 | be('imports', () => {
it('should retain regular imports when symbol is eagerly referenced', () => {
env.write(
'cmp-a.ts',
`
import { Component } from '@angular/core';
@Component({
standalone: true,
selector: 'cmp-a',
template: '... | {
"end_byte": 12055,
"start_byte": 3262,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/defer_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/defer_spec.ts_12063_20788 | ltiple imports to the same file when one is deferrable and the other is type-only at the declaration level', () => {
env.write(
'cmp-a.ts',
`
import { Component } from '@angular/core';
export class Foo {}
@Component({
standalone: true,
... | {
"end_byte": 20788,
"start_byte": 12063,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/defer_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/defer_spec.ts_20794_23478 | the `when` trigger as an eager dependency', () => {
env.write(
'test-pipe.ts',
`
import { Pipe } from '@angular/core';
@Pipe({name: 'test', standalone: true})
export class TestPipe {
transform() {
return 1;
}
}
`,
);
... | {
"end_byte": 23478,
"start_byte": 20794,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/defer_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/defer_spec.ts_23484_29776 | ports', () => {
beforeEach(() => {
env.tsconfig({onlyExplicitDeferDependencyImports: true});
});
it('should handle `@Component.deferredImports` field', () => {
env.write(
'deferred-a.ts',
`
import {Component} from '@angular/core';
@Component({
... | {
"end_byte": 29776,
"start_byte": 23484,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/defer_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/defer_spec.ts_29784_38636 | it('should produce an error when unsupported type (@Injectable) is used in `deferredImports`', () => {
env.write(
'test.ts',
`
import {Component, Injectable} from '@angular/core';
@Injectable()
class MyInjectable {}
@Component({
... | {
"end_byte": 38636,
"start_byte": 29784,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/defer_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/defer_spec.ts_38642_43710 | it('should generate setClassMetadataAsync for components with defer blocks', () => {
env.write(
'cmp-a.ts',
`
import {Component} from '@angular/core';
@Component({
standalone: true,
selector: 'cmp-a',
template: 'CmpA!'
}... | {
"end_byte": 43710,
"start_byte": 38642,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/defer_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/standalone_spec.ts_0_581 | /**
* @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, ngErrorCode} from '../../src/ngtsc/diagnostics';
import {runInEachF... | {
"end_byte": 581,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/standalone_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/standalone_spec.ts_583_9627 | runInEachFileSystem(() => {
describe('ngtsc compilation of standalone types', () => {
let env!: NgtscTestEnvironment;
beforeEach(() => {
env = NgtscTestEnvironment.setup(testFiles);
env.tsconfig({strictTemplates: true});
});
describe('component-side', () => {
it('should compile a b... | {
"end_byte": 9627,
"start_byte": 583,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/standalone_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/standalone_spec.ts_9635_19254 | compile a standalone component that imports an NgModule', () => {
env.write(
'test.ts',
`
import {Component, Directive, NgModule} from '@angular/core';
@Directive({
selector: '[dir]',
standalone: false,
})
... | {
"end_byte": 19254,
"start_byte": 9635,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/standalone_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/standalone_spec.ts_19262_27989 | not spam errors if imports is misconfigured', () => {
env.write(
'test.ts',
`
import {Component, Input} from '@angular/core';
@Component({
standalone: true,
selector: 'dep-cmp',
template: '',
})
export class DepCmp... | {
"end_byte": 27989,
"start_byte": 19262,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/standalone_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/standalone_spec.ts_27995_37063 | from libraries', () => {
it('should consume standalone directives from libraries', () => {
env.write(
'lib.d.ts',
`
import {ɵɵDirectiveDeclaration} from '@angular/core';
export declare class StandaloneDir {
static ɵdir: ɵɵDirectiveDeclaration<Standalone... | {
"end_byte": 37063,
"start_byte": 27995,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/standalone_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/standalone_spec.ts_37067_39105 | env!: NgtscTestEnvironment;
beforeEach(() => {
env = NgtscTestEnvironment.setup(testFiles);
env.tsconfig({strictTemplates: true, strictStandalone: true});
});
it('should not allow a non-standalone component', () => {
env.write(
'app.ts',
`
import {Component} from ... | {
"end_byte": 39105,
"start_byte": 37067,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/standalone_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/hmr_spec.ts_0_383 | /*!
* @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 {runInEachFileSystem} from '../../src/ngtsc/file_system/testing';
import {loadStandardTestFiles} from '../../... | {
"end_byte": 383,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/hmr_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/hmr_spec.ts_385_8574 | runInEachFileSystem(() => {
describe('HMR code generation', () => {
const testFiles = loadStandardTestFiles();
let env!: NgtscTestEnvironment;
beforeEach(() => {
env = NgtscTestEnvironment.setup(testFiles);
env.tsconfig();
});
function enableHmr(): void {
env.write(
'ts... | {
"end_byte": 8574,
"start_byte": 385,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/hmr_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_0_1482 | /**
* @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, ngErrorCode} from '../../src/ngtsc/diagnostics';
import {runInEachF... | {
"end_byte": 1482,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_1488_10832 | describe('extra imports generation', () => {
beforeEach(() => {
const tsconfig: {[key: string]: any} = {
extends: '../tsconfig-base.json',
compilerOptions: {
baseUrl: '.',
rootDirs: ['/app'],
},
angularCompilerOptions: {
compilati... | {
"end_byte": 10832,
"start_byte": 1488,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_10840_14877 | it('should include extra import for the local component dependencies (component, directive and pipe)', () => {
env.write(
'internal_comp.ts',
`
import {Component} from '@angular/core';
@Component({
template: '...',
selector: 'internal-comp',
st... | {
"end_byte": 14877,
"start_byte": 10840,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_14883_20804 | scribe('ng module injector def', () => {
it('should produce empty injector def imports when module has no imports/exports', () => {
env.write(
'test.ts',
`
import {NgModule} from '@angular/core';
@NgModule({})
export class MainModule {
}
`,
... | {
"end_byte": 20804,
"start_byte": 14883,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_20810_28901 | endencies', () => {
it('should generate ɵɵgetComponentDepsFactory for component def dependencies - for non-standalone component ', () => {
env.write(
'test.ts',
`
import {NgModule, Component} from '@angular/core';
@Component({
selector: 'test-main',
... | {
"end_byte": 28901,
"start_byte": 20810,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_28907_37176 | it('should include injector types with all possible import/injection styles into component factory', () => {
env.write(
'test.ts',
`
import {Component, NgModule, Attribute, Inject} from '@angular/core';
import {SomeClass} from './some-where'
import {SomeSer... | {
"end_byte": 37176,
"start_byte": 28907,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_37184_45786 | ) => {
env.write(
'test.ts',
`
import {Pipe, Attribute, Inject} from '@angular/core';
import {SomeClass} from './some-where'
import {SomeService1} from './some-where1'
import SomeService2 from './some-where2'
import * as SomeWhere3 from './so... | {
"end_byte": 45786,
"start_byte": 37184,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_45794_47172 | t {Directive} from '@angular/core';
type MyService = {a:string};
@Directive()
export class MyDirective {
constructor(
private myService: MyService,
) {}
}
`,
);
env.driveMain();
const jsContents = env.ge... | {
"end_byte": 47172,
"start_byte": 45794,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_47178_56161 | env.write(
'test.ts',
`
import {Component} from '@angular/core';
import {ExternalString} from './some-where';
@Component({
template: ExternalString,
})
export class Main {
}
`,
);
const errors =... | {
"end_byte": 56161,
"start_byte": 47178,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_56169_60169 | import {Directive, HostBinding} from '@angular/core';
import {ExternalString} from './some-where';
@Directive({selector: '[test]'})
export class Main {
@HostBinding(ExternalString) id = 'some thing';
}
`,
);
const errors = env.driveD... | {
"end_byte": 60169,
"start_byte": 56169,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_60175_66541 | import {Directive, Component} from '@angular/core';
import {ExternalDirective} from 'some_where';
import * as n from 'some_where2';
@Directive({standalone: true})
export class LocalDirective {
}
@Component({
selector: 'my-comp',
... | {
"end_byte": 66541,
"start_byte": 60175,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_66547_69739 | Component, NgModule, Input} from '@angular/core';
import {externalFunc} from './some_where';
@Component({
template: '<span>{{x}}</span>',
})
export class Main {
@Input({transform: externalFunc})
x: string = '';
}
`,
);
env.driv... | {
"end_byte": 69739,
"start_byte": 66547,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_69745_77696 | .write(
'deferred-a.ts',
`
import {Component} from '@angular/core';
@Component({
standalone: true,
selector: 'deferred-cmp-a',
template: 'DeferredCmpA contents',
})
export class DeferredCmpA {
}
`,
... | {
"end_byte": 77696,
"start_byte": 69745,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts_77704_86695 | s',
`
import {Component} from '@angular/core';
@Component({
standalone: true,
selector: 'deferred-cmp-a',
template: 'DeferredCmpA contents',
})
export class DeferredCmpA {
}
... | {
"end_byte": 86695,
"start_byte": 77704,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/local_compilation_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/component_indexing_spec.ts_0_6656 | /**
* @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 {
AbsoluteFsPath,
getFileSystem,
PathManipulation,
} from '@angular/compiler-cli/src/ngtsc/file_system';... | {
"end_byte": 6656,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/component_indexing_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/authoring_models_spec.ts_0_7906 | /**
* @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 {runInEachFileSystem} from '../../src/ngtsc/file_system/testing';
import {loadS... | {
"end_byte": 7906,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/authoring_models_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/authoring_models_spec.ts_7912_16744 | 'type checking', () => {
it('should check a primitive value bound to a model input', () => {
env.write(
'test.ts',
`
import {Component, Directive, model} from '@angular/core';
@Directive({
selector: '[dir]',
standalone: true,
})
... | {
"end_byte": 16744,
"start_byte": 7912,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/authoring_models_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/authoring_models_spec.ts_16750_21749 | d allow two-way binding to a generic model input', () => {
env.write(
'test.ts',
`
import {Component, Directive, model, signal} from '@angular/core';
@Directive({
selector: '[dir]',
standalone: true,
})
export class TestDir<T> {
value ... | {
"end_byte": 21749,
"start_byte": 16750,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/authoring_models_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/monorepo_spec.ts_0_3492 | /**
* @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 {absoluteFrom} from '../../src/ngtsc/file_system';
import {runInEachFileSystem} from '../../src/ngtsc/file_sy... | {
"end_byte": 3492,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/monorepo_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_0_871 | /**
* @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 {DiagnosticCategoryLabel} from '../../src/ngtsc/core/api';
import {ErrorCode, n... | {
"end_byte": 871,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_873_9233 | runInEachFileSystem(() => {
describe('ngtsc type checking', () => {
let env!: NgtscTestEnvironment;
beforeEach(() => {
env = NgtscTestEnvironment.setup(testFiles);
env.tsconfig({fullTemplateTypeCheck: true});
env.write(
'node_modules/@angular/animations/index.d.ts',
`
... | {
"end_byte": 9233,
"start_byte": 873,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_9238_17627 | it('ngIf should narrow on output types', () => {
env.tsconfig({strictTemplates: true});
env.write(
'test.ts',
`
import {CommonModule} from '@angular/common';
import {Component, NgModule} from '@angular/core';
@Component({
selector: 'test',
templat... | {
"end_byte": 17627,
"start_byte": 9238,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_17633_25405 | it('should type check a two-way binding to a function value', () => {
env.tsconfig({strictTemplates: true});
env.write(
'test.ts',
`
import {Component, Directive, Input, Output, EventEmitter} from '@angular/core';
type TestFn = (val: number | null | undefined) => string;
... | {
"end_byte": 25405,
"start_byte": 17633,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_25411_33626 | describe('strictSafeNavigationTypes', () => {
beforeEach(() => {
env.write(
'test.ts',
`
import {Component, Directive, NgModule, Input} from '@angular/core';
@Component({
selector: 'test',
template: '<div dir [foo]="!!invalid && user?.isMemb... | {
"end_byte": 33626,
"start_byte": 25411,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_33632_41500 | describe('strictAttributeTypes', () => {
beforeEach(() => {
env.write(
'test.ts',
`
import {Component, Directive, NgModule, Input} from '@angular/core';
@Component({
selector: 'test',
template: '<textarea dir disabled cols="3"></textarea>',
... | {
"end_byte": 41500,
"start_byte": 33632,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_41506_49823 | it('should accept an NgFor iteration over an any-typed value', () => {
env.write(
'test.ts',
`
import {CommonModule} from '@angular/common';
import {Component, NgModule} from '@angular/core';
@Component({
selector: 'test',
template: '<div *ngFor="let user of users">{{user.... | {
"end_byte": 49823,
"start_byte": 41506,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_49829_56806 | it('should report an error with an unknown pipe', () => {
env.write(
'test.ts',
`
import {Component, NgModule} from '@angular/core';
@Component({
selector: 'test',
template: '{{expr | unknown}}',
standalone: false,
})
class TestCmp {
... | {
"end_byte": 56806,
"start_byte": 49829,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_56812_63561 | it('should properly type-check inherited directives from external libraries', () => {
env.tsconfig({fullTemplateTypeCheck: true, strictInputTypes: true});
env.write(
'node_modules/external/index.d.ts',
`
import * as i0 from '@angular/core';
export declare class AbstractDir ... | {
"end_byte": 63561,
"start_byte": 56812,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_63567_72311 | ', () => {
beforeEach(() => {
env.tsconfig({fullTemplateTypeCheck: true, strictInputTypes: true});
env.write(
'node_modules/@angular/material/index.d.ts',
`
import * as i0 from '@angular/core';
export declare class MatInput {
value: string;
... | {
"end_byte": 72311,
"start_byte": 63567,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_72319_81236 | ted transform function with a complex type', () => {
env.tsconfig({strictTemplates: true});
env.write(
'types.ts',
`
export class ComplexObjValue {
foo: boolean;
}
export interface ComplexObj {
value: ComplexObjValue;
... | {
"end_byte": 81236,
"start_byte": 72319,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_81244_88456 | be assigned if the transform function has no parameters', () => {
env.tsconfig({strictTemplates: true});
env.write(
'test.ts',
`
import {Component, Directive, Input} from '@angular/core';
@Directive({selector: '[dir]', standalone: true})
exp... | {
"end_byte": 88456,
"start_byte": 81244,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_88462_97931 | () => {
const directiveDeclaration = `
@Directive({
selector: '[dir]',
standalone: false,
})
export class TestDir {
@Input()
protected protectedField!: string;
@Input()
private privateField!: st... | {
"end_byte": 97931,
"start_byte": 88462,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_97937_106347 | ng with the DOM schema', () => {
beforeEach(() => {
env.tsconfig({fullTemplateTypeCheck: false});
});
it('should check for unknown elements', () => {
env.write(
'test.ts',
`
import {Component, NgModule} from '@angular/core';
@Component({
s... | {
"end_byte": 106347,
"start_byte": 97937,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_106355_114804 | tics for custom-elements-style elements when using the CUSTOM_ELEMENTS_SCHEMA', () => {
env.write(
'test.ts',
`
import {Component, NgModule, CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
@Component({
selector: 'blah',
template: '<custom-el... | {
"end_byte": 114804,
"start_byte": 106355,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_114810_121866 | verification', () => {
beforeEach(() => env.write('index.ts', `export const a = 1;`));
it('should error if "fullTemplateTypeCheck" is false when "strictTemplates" is true', () => {
env.tsconfig({fullTemplateTypeCheck: false, strictTemplates: true});
const diags = env.driveDiagnostics();
... | {
"end_byte": 121866,
"start_byte": 114810,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_121872_130618 | => {
beforeEach(() => {
env.tsconfig({strictTemplates: true});
});
it('should check bindings to host directive inputs', () => {
env.write(
'test.ts',
`
import {Component, Directive, NgModule, Input} from '@angular/core';
@Directive({
... | {
"end_byte": 130618,
"start_byte": 121872,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_130626_138681 | liased host directive inputs', () => {
env.write(
'test.ts',
`
import {Component, Directive, NgModule, Input} from '@angular/core';
@Directive({
standalone: true,
})
class HostDir {
@Input('ownInputAlias') input: number;
... | {
"end_byte": 138681,
"start_byte": 130626,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_138687_143385 | it('should check bindings inside deferred blocks', () => {
env.write(
'test.ts',
`
import {Component} from '@angular/core';
@Component({
template: \`
@defer {
{{does_not_exist_main}}
} @placeholder {
... | {
"end_byte": 143385,
"start_byte": 138687,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_143391_152260 | it('should check bindings inside if blocks', () => {
env.write(
'test.ts',
`
import {Component} from '@angular/core';
@Component({
template: \`
@if (expr) {
{{does_not_exist_main}}
} @else if (expr1) {
... | {
"end_byte": 152260,
"start_byte": 143391,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_152268_161604 | side else if blocks', () => {
env.write(
'test.ts',
`
import {Component} from '@angular/core';
@Component({
template: \`
@if (expr === 1) {
One
} @else if (expr === 'hello') {
<button (click)="accept... | {
"end_byte": 161604,
"start_byte": 152268,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_161612_164294 | and @case have different types', () => {
env.write(
'test.ts',
`
import {Component} from '@angular/core';
@Component({
template: \`
@switch (expr) {
@case (1) {
{{expr}}
}
}
... | {
"end_byte": 164294,
"start_byte": 161612,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_164300_173074 | beforeEach(() => {
// `fullTemplateTypeCheck: true` is necessary so content inside `ng-template` is checked.
env.tsconfig({fullTemplateTypeCheck: true});
});
it('should check bindings inside of for loop blocks', () => {
env.write(
'test.ts',
`
import {C... | {
"end_byte": 173074,
"start_byte": 164300,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_173082_182303 | mplate variables in two-way bindings', () => {
env.write(
'test.ts',
`
import {Component, Directive, Input, Output, EventEmitter, signal} from '@angular/core';
@Directive({
selector: '[twoWayDir]',
standalone: true
})
export cl... | {
"end_byte": 182303,
"start_byte": 173082,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_182311_186888 | ` block variables inside the tracking expression', () => {
env.write(
'/test.ts',
`
import { Component } from '@angular/core';
@Component({
selector: 'test-cmp',
standalone: true,
template: \`
@if (expr; as al... | {
"end_byte": 186888,
"start_byte": 182311,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_186894_195552 | diagnostics', () => {
it('should report when an @if block prevents an element from being projected', () => {
env.write(
'test.ts',
`
import {Component} from '@angular/core';
@Component({
selector: 'comp',
template: '<ng-content/> <ng-content... | {
"end_byte": 195552,
"start_byte": 186894,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_195560_205051 | the same slot but cannot be projected', () => {
env.write(
'test.ts',
`
import {Component} from '@angular/core';
@Component({
selector: 'comp',
template: '<ng-content select="[foo]"/>',
standalone: true,
})
class C... | {
"end_byte": 205051,
"start_byte": 195560,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_205057_214278 | beforeEach(() =>
env.tsconfig({
strictTemplates: true,
extendedDiagnostics: {
checks: {
// Suppress the diagnostic for unused @let since some of the error cases
// we're checking for here also qualify as being unused which adds noise.
u... | {
"end_byte": 214278,
"start_byte": 205057,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_214286_223722 | the same name as a local reference defined before it', () => {
env.write(
'test.ts',
`
import {Component} from '@angular/core';
@Component({
template: \`
<input #value>
@let value = 1;
{{value}}
\`,
... | {
"end_byte": 223722,
"start_byte": 214286,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_223730_227980 | laration in a two-way binding', () => {
env.write(
'test.ts',
`
import {Component, Directive, Input, Output, EventEmitter} from '@angular/core';
@Directive({
selector: '[twoWayDir]',
standalone: true
})
export class TwoWayDir {
... | {
"end_byte": 227980,
"start_byte": 223730,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_227986_236814 | > {
it('should report when a directive is not used within a template', () => {
env.write(
'used.ts',
`
import {Directive} from '@angular/core';
@Directive({selector: '[used]', standalone: true})
export class UsedDir {}
`,
);
... | {
"end_byte": 236814,
"start_byte": 227986,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts_236822_245045 | from the same file', () => {
env.write(
'used.ts',
`
import {Directive} from '@angular/core';
@Directive({selector: '[used]', standalone: true})
export class UsedDir {}
`,
);
env.write(
'other-used.ts',
`
... | {
"end_byte": 245045,
"start_byte": 236822,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts_0_9625 | /**
* @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 '../../src/ngtsc/file_system';
import {runInEachFileSystem}... | {
"end_byte": 9625,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts_9633_18242 | it('should type-check correctly when the backing field of an input is removed', () => {
// For inputs that are only declared in the decorator but for which no backing field is
// declared in the TypeScript class, the TCB should not contain a write to the field as it
// would be an error. This te... | {
"end_byte": 18242,
"start_byte": 9633,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts_18250_25589 | it('should type-check correctly when an ngTemplateGuard field is declared', () => {
// This test verifies that adding an `ngTemplateGuard` static member has the desired effect
// of type-narrowing the bound input expression within the template.
env.write(
'dir.ts',
`
... | {
"end_byte": 25589,
"start_byte": 18250,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts_25595_33279 | describe('type parameters', () => {
it('should type-check correctly when directive becomes generic', () => {
// This test verifies that changing a non-generic directive `Dir` into a generic directive
// correctly type-checks component `Cmp` that uses `Dir` in its template. The introduction
... | {
"end_byte": 33279,
"start_byte": 25595,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts_33287_40138 | it('should type-check correctly when a generic type bound is added', () => {
// This test verifies that changing an unbound generic type parameter of directive `Dir`
// to have a type constraint properly applies the newly added type constraint during
// type-checking of `Cmp` that uses `Dir` in ... | {
"end_byte": 40138,
"start_byte": 33287,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts_40144_48595 | describe('inheritance', () => {
it('should type-check derived directives when the public API of the parent class is affected', () => {
// This test verifies that an indirect change to the public API of `Dir` as caused by a
// change to `Dir`'s base class `Parent` causes the type-check result of co... | {
"end_byte": 48595,
"start_byte": 40144,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts_48603_55707 | it('should type-check derived directives when a base class is removed from a grandparent', () => {
// This test verifies that an indirect change to the public API of `Dir` as caused by
// removing a base class `Grandgrandparent` from `Dir`'s transitive base class
// `Grandparent` causes the type... | {
"end_byte": 55707,
"start_byte": 48603,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts_55713_59273 | describe('program re-use', () => {
it('should completely re-use structure when the first signal input is introduced', () => {
env.tsconfig({strictTemplates: true});
env.write(
'dir.ts',
`
import {Directive, Input} from '@angular/core';
@Directive({
... | {
"end_byte": 59273,
"start_byte": 55713,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_typecheck_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/util.ts_0_660 | /**
* @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,
isNamedClassDeclaration,
} from '@angular/compiler-cli/src/ngtsc/reflection';
import t... | {
"end_byte": 660,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/util.ts"
} |
angular/packages/compiler-cli/test/ngtsc/authoring_queries_spec.ts_0_5442 | /**
* @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 {runInEachFileSystem} from '../../src/ngtsc/file_system/testing';
import {loadS... | {
"end_byte": 5442,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/authoring_queries_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/authoring_queries_spec.ts_5448_11589 | it('should report an error when used with query decorator', () => {
env.write(
'test.ts',
`
import {Component, viewChild, ViewChild} from '@angular/core';
@Component({selector: 'test', template: ''})
export class TestDir {
@ViewChild('myLocator') el = v... | {
"end_byte": 11589,
"start_byte": 5448,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/authoring_queries_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/BUILD.bazel_0_1333 | load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
ts_library(
name = "ngtsc_lib",
testonly = True,
srcs = glob(["**/*.ts"]),
deps = [
"//packages/compiler",
"//packages/compiler-cli",
"//packages/compiler-cli/src/ngtsc/core:api",
"//packages/compiler-cli/sr... | {
"end_byte": 1333,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/BUILD.bazel"
} |
angular/packages/compiler-cli/test/ngtsc/sourcemap_utils.ts_0_3578 | /**
* @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 {MappingItem, RawSourceMap, SourceMapConsumer} from 'source-map';
import {NgtscTestEnvironment} from './env';... | {
"end_byte": 3578,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/sourcemap_utils.ts"
} |
angular/packages/compiler-cli/test/ngtsc/env.ts_0_1589 | /**
* @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 {CustomTransformers, defaultGatherDiagnostics, Program} from '@angular/compiler-cli';
import {DocEntry} from ... | {
"end_byte": 1589,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/env.ts"
} |
angular/packages/compiler-cli/test/ngtsc/env.ts_1590_9747 | export class NgtscTestEnvironment {
private multiCompileHostExt: MultiCompileHostExt | null = null;
private oldProgram: Program | null = null;
private changedResources: Set<string> | null = null;
private commandLineArgs: string[];
private constructor(
private fs: FileSystem,
readonly outDir: Absolute... | {
"end_byte": 9747,
"start_byte": 1590,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/env.ts"
} |
angular/packages/compiler-cli/test/ngtsc/env.ts_9751_15608 | driveTemplateTypeChecker(): {program: ts.Program; checker: TemplateTypeChecker} {
const {rootNames, options} = readNgcCommandLineAndConfiguration(this.commandLineArgs);
const host = createCompilerHost({options});
const program = createProgram({rootNames, host, options});
const checker = (program as Ngts... | {
"end_byte": 15608,
"start_byte": 9751,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/env.ts"
} |
angular/packages/compiler-cli/test/ngtsc/authoring_outputs_spec.ts_0_9367 | /**
* @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 {runInEachFileSystem} from '../../src/ngtsc/file_system/testing';
import {loadS... | {
"end_byte": 9367,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/authoring_outputs_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_error_spec.ts_0_7161 | /**
* @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 {absoluteFrom as _} from '../../src/ngtsc/file_system';
import {runInEachFileSystem} from '../../src/ngtsc/fi... | {
"end_byte": 7161,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_error_spec.ts"
} |
angular/packages/compiler-cli/test/ngtsc/incremental_error_spec.ts_7167_14466 | it('should recover from an error in a component that is part of a module', () => {
// In this test, there are two components, TestCmp and TargetCmp, that are part of the same
// NgModule. TestCmp is broken in an incremental build and then fixed, and the test verifies
// that TargetCmp is re-emitted.
... | {
"end_byte": 14466,
"start_byte": 7167,
"url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/ngtsc/incremental_error_spec.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.