_id
stringlengths
21
254
text
stringlengths
1
93.7k
metadata
dict
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_72298_79356
it('should call `$postLink()` on controller', waitForAsync(() => { const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); const $postLinkSpyA = jasmine.createSpy('$postLinkA'); const $postLinkSpyB = jasmine.createSpy('$postLinkB'); @Component({ ...
{ "end_byte": 79356, "start_byte": 72298, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts" }
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_79366_85400
it('should call `$onDestroy()` on controller', fakeAsync(() => { const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); const $onDestroySpyA = jasmine.createSpy('$onDestroyA'); const $onDestroySpyB = jasmine.createSpy('$onDestroyB'); let ng2ComponentInst...
{ "end_byte": 85400, "start_byte": 79366, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts" }
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_85408_95009
describe('destroying the upgraded component', () => { it('should destroy `componentScope`', fakeAsync(() => { const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); const scopeDestroyListener = jasmine.createSpy('scopeDestroyListener'); let ng2ComponentIns...
{ "end_byte": 95009, "start_byte": 85408, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts" }
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_95017_102267
describe('linking', () => { it('should run the pre-linking after instantiating the controller', waitForAsync(() => { const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); const log: string[] = []; // Define `ng1Directive` const ng1Directive: an...
{ "end_byte": 102267, "start_byte": 95017, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts" }
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_102275_108923
describe('transclusion', () => { it('should support single-slot transclusion', waitForAsync(() => { const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); let ng2ComponentAInstance: Ng2ComponentA; let ng2ComponentBInstance: Ng2ComponentB; // Def...
{ "end_byte": 108923, "start_byte": 102275, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts" }
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_108933_116093
it('should support default slot (with fallback content)', waitForAsync(() => { const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); let ng1ControllerInstances: any[] = []; let ng2ComponentInstance: Ng2Component; // Define `ng1Component` cons...
{ "end_byte": 116093, "start_byte": 108933, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts" }
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_116103_123596
it('should support structural directives in transcluded content', waitForAsync(() => { const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); let ng2ComponentInstance: Ng2Component; // Define `ng1Component` const ng1Component: angular.IComponent = { ...
{ "end_byte": 123596, "start_byte": 116103, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts" }
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_123602_128892
describe('testability', () => { it('should handle deferred bootstrap', waitForAsync(() => { @NgModule({imports: [BrowserModule]}) class MyNg2Module {} const adapter: UpgradeAdapter = new UpgradeAdapter(MyNg2Module); angular.module_('ng1', []); let bootstrapResumed: boolean...
{ "end_byte": 128892, "start_byte": 123602, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts" }
angular/packages/upgrade/src/dynamic/test/BUILD.bazel_0_609
load("//tools:defaults.bzl", "karma_web_test_suite", "ts_library") ts_library( name = "test_lib", testonly = True, srcs = glob([ "**/*.ts", ]), deps = [ "//packages/core", "//packages/core/testing", "//packages/platform-browser", "//packages/platform-browser-...
{ "end_byte": 609, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/BUILD.bazel" }
angular/packages/upgrade/src/dynamic/src/upgrade_adapter.ts_0_4774
/** * @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 { Compiler, CompilerOptions, Injector, NgModule, NgModuleRef, NgZone, resolveForwardRef, Stat...
{ "end_byte": 4774, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/src/upgrade_adapter.ts" }
angular/packages/upgrade/src/dynamic/src/upgrade_adapter.ts_4775_12493
export class UpgradeAdapter { private idPrefix: string = `NG2_UPGRADE_${upgradeCount++}_`; private downgradedComponents: Type<any>[] = []; /** * An internal map of ng1 components which need to up upgraded to ng2. * * We can't upgrade until injector is instantiated and we can retrieve the component metada...
{ "end_byte": 12493, "start_byte": 4775, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/src/upgrade_adapter.ts" }
angular/packages/upgrade/src/dynamic/src/upgrade_adapter.ts_12496_18039
registerForNg1Tests(modules?: string[]): UpgradeAdapterRef { const windowNgMock = (window as any)['angular'].mock; if (!windowNgMock || !windowNgMock.module) { throw new Error("Failed to find 'angular.mock.module'."); } const {ng1Module, ng2BootstrapDeferred} = this.declareNg1Module(modules); ...
{ "end_byte": 18039, "start_byte": 12496, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/src/upgrade_adapter.ts" }
angular/packages/upgrade/src/dynamic/src/upgrade_adapter.ts_18042_25473
private declareNg1Module(modules: string[] = []): { ng1Module: IModule; ng2BootstrapDeferred: Deferred<IInjectorService>; ngZone: NgZone; } { const delayApplyExps: Function[] = []; let original$applyFn: Function; let rootScopePrototype: any; const upgradeAdapter = this; const ng1Module...
{ "end_byte": 25473, "start_byte": 18042, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/src/upgrade_adapter.ts" }
angular/packages/upgrade/src/dynamic/src/upgrade_ng1_adapter.ts_0_5272
/** * @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 { Directive, DoCheck, ElementRef, EventEmitter, Inject, Injector, OnChanges, OnDestroy, OnI...
{ "end_byte": 5272, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/src/upgrade_ng1_adapter.ts" }
angular/packages/upgrade/src/dynamic/src/upgrade_ng1_adapter.ts_5274_9856
@Directive() class UpgradeNg1ComponentAdapter implements OnInit, OnChanges, DoCheck { private controllerInstance: IControllerInstance | null = null; destinationObj: IBindingDestination | null = null; checkLastValues: any[] = []; directive: IDirective; element: Element; $element: any = null; componentScope...
{ "end_byte": 9856, "start_byte": 5274, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/src/upgrade_ng1_adapter.ts" }
angular/packages/upgrade/src/common/BUILD.bazel_0_420
load("//tools:defaults.bzl", "ts_library") package(default_visibility = [ "//packages:__pkg__", "//packages/upgrade:__subpackages__", "//tools/public_api_guard:__subpackages__", ]) ts_library( name = "common", srcs = glob([ "src/**/*.ts", ]), deps = [ "//packages/core", ...
{ "end_byte": 420, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/BUILD.bazel" }
angular/packages/upgrade/src/common/test/downgrade_injectable_spec.ts_0_2723
/** * @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 {Injector} from '@angular/core'; import * as angular from '../src/angular1'; import {$INJECTOR, INJECTOR_KEY,...
{ "end_byte": 2723, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/test/downgrade_injectable_spec.ts" }
angular/packages/upgrade/src/common/test/downgrade_component_adapter_spec.ts_0_7654
/** * @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 { Compiler, Component, ComponentFactory, Injector, NgModule, TestabilityRegistry, } from '@angular...
{ "end_byte": 7654, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/test/downgrade_component_adapter_spec.ts" }
angular/packages/upgrade/src/common/test/promise_util_spec.ts_0_3536
/** * @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 {isThenable, SyncPromise} from '../src/promise_util'; describe('isThenable()', () => { it('should return f...
{ "end_byte": 3536, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/test/promise_util_spec.ts" }
angular/packages/upgrade/src/common/test/BUILD.bazel_0_710
load("//tools:defaults.bzl", "karma_web_test_suite", "ts_library") load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test") circular_dependency_test( name = "circular_deps_test", entry_point = "angular/packages/upgrade/index.mjs", deps = ["//packages/upgrade"], ) ts_library( name...
{ "end_byte": 710, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/test/BUILD.bazel" }
angular/packages/upgrade/src/common/test/component_info_spec.ts_0_1419
/** * @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 {PropertyBinding} from '../src/component_info'; describe('PropertyBinding', () => { it('should process a s...
{ "end_byte": 1419, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/test/component_info_spec.ts" }
angular/packages/upgrade/src/common/test/helpers/BUILD.bazel_0_288
load("//tools:defaults.bzl", "ts_library") package(default_visibility = ["//packages/upgrade:__subpackages__"]) ts_library( name = "helpers", srcs = glob([ "*.ts", ]), deps = [ "//packages/core/testing", "//packages/upgrade/src/common", ], )
{ "end_byte": 288, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/test/helpers/BUILD.bazel" }
angular/packages/upgrade/src/common/test/helpers/common_test_helpers.ts_0_7492
/** * @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 {setAngularJSGlobal} from '../../src/angular1'; // Whether the upgrade tests should run against AngularJS min...
{ "end_byte": 7492, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/test/helpers/common_test_helpers.ts" }
angular/packages/upgrade/src/common/src/promise_util.ts_0_1614
/** * @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 {isFunction} from './util'; export interface Thenable<T> { then(callback: (value: T) => any): any; } expo...
{ "end_byte": 1614, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/promise_util.ts" }
angular/packages/upgrade/src/common/src/downgrade_injectable.ts_0_3762
/** * @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 {Injector} from '@angular/core'; import {IInjectorService} from './angular1'; import {$INJECTOR, INJECTOR_KE...
{ "end_byte": 3762, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/downgrade_injectable.ts" }
angular/packages/upgrade/src/common/src/angular1.ts_0_6926
/** * @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 type Ng1Token = string; export type Ng1Expression = string | Function; export interface IAnnotatedFunction ...
{ "end_byte": 6926, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/angular1.ts" }
angular/packages/upgrade/src/common/src/angular1.ts_6928_10230
export interface INgModelController { $render(): void; $isEmpty(value: any): boolean; $setValidity(validationErrorKey: string, isValid: boolean): void; $setPristine(): void; $setDirty(): void; $setUntouched(): void; $setTouched(): void; $rollbackViewValue(): void; $validate(): void; $commitViewValue...
{ "end_byte": 10230, "start_byte": 6928, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/angular1.ts" }
angular/packages/upgrade/src/common/src/upgrade_helper.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 {ElementRef, Injector, SimpleChanges} from '@angular/core'; import { DirectiveRequireProperty, element a...
{ "end_byte": 1265, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/upgrade_helper.ts" }
angular/packages/upgrade/src/common/src/upgrade_helper.ts_1266_10226
export class UpgradeHelper { public readonly $injector: IInjectorService; public readonly element: Element; public readonly $element: IAugmentedJQuery; public readonly directive: IDirective; private readonly $compile: ICompileService; private readonly $controller: IControllerService; constructor( in...
{ "end_byte": 10226, "start_byte": 1266, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/upgrade_helper.ts" }
angular/packages/upgrade/src/common/src/upgrade_helper.ts_10230_12074
private resolveRequire( require: DirectiveRequireProperty, ): SingleOrListOrMap<IControllerInstance> | null { if (!require) { return null; } else if (Array.isArray(require)) { return require.map((req) => this.resolveRequire(req)); } else if (typeof require === 'object') { const value...
{ "end_byte": 12074, "start_byte": 10230, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/upgrade_helper.ts" }
angular/packages/upgrade/src/common/src/constants.ts_0_1404
/** * @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 const $COMPILE = '$compile'; export const $CONTROLLER = '$controller'; export const $DELEGATE = '$delegate'; ...
{ "end_byte": 1404, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/constants.ts" }
angular/packages/upgrade/src/common/src/downgrade_component.ts_0_3204
/** * @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 {ComponentFactory, ComponentFactoryResolver, Injector, NgZone, Type} from '@angular/core'; import { IAnnot...
{ "end_byte": 3204, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/downgrade_component.ts" }
angular/packages/upgrade/src/common/src/downgrade_component.ts_3205_12100
export function downgradeComponent(info: { component: Type<any>; downgradedModule?: string; propagateDigest?: boolean; /** @deprecated since v4. This parameter is no longer used */ inputs?: string[]; /** @deprecated since v4. This parameter is no longer used */ outputs?: string[]; /** @deprecated since ...
{ "end_byte": 12100, "start_byte": 3205, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/downgrade_component.ts" }
angular/packages/upgrade/src/common/src/downgrade_component.ts_12101_12665
class ParentInjectorPromise extends SyncPromise<Injector> { private injectorKey: string = controllerKey(INJECTOR_KEY); constructor(private element: IAugmentedJQuery) { super(); // Store the promise on the element. element.data!(this.injectorKey, this); } override resolve(injector: Injector): void...
{ "end_byte": 12665, "start_byte": 12101, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/downgrade_component.ts" }
angular/packages/upgrade/src/common/src/util.ts_0_7230
/** * @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 {Injector, Type, ɵNG_MOD_DEF} from '@angular/core'; import { element as angularElement, IAugmentedJQuery...
{ "end_byte": 7230, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/util.ts" }
angular/packages/upgrade/src/common/src/component_info.ts_0_1026
/** * @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 `PropertyBinding` represents a mapping between a property name * and an attribute name. It is parsed from ...
{ "end_byte": 1026, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/component_info.ts" }
angular/packages/upgrade/src/common/src/version.ts_0_418
/** * @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 */ /** * @module * @description * Entry point for all public APIs of the upgrade package. */ import {Version} from...
{ "end_byte": 418, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/version.ts" }
angular/packages/upgrade/src/common/src/downgrade_component_adapter.ts_0_859
/** * @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 { ApplicationRef, ChangeDetectorRef, ComponentFactory, ComponentRef, EventEmitter, Injector, On...
{ "end_byte": 859, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/downgrade_component_adapter.ts" }
angular/packages/upgrade/src/common/src/downgrade_component_adapter.ts_861_9646
port class DowngradeComponentAdapter { private implementsOnChanges = false; private inputChangeCount: number = 0; private inputChanges: SimpleChanges = {}; private componentScope: IScope; constructor( private element: IAugmentedJQuery, private attrs: IAttributes, private scope: IScope, privat...
{ "end_byte": 9646, "start_byte": 861, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/downgrade_component_adapter.ts" }
angular/packages/upgrade/src/common/src/downgrade_component_adapter.ts_9650_14122
ivate registerCleanup(componentRef: ComponentRef<any>) { const testabilityRegistry = componentRef.injector.get(TestabilityRegistry); const destroyComponentRef = this.wrapCallback(() => componentRef.destroy()); let destroyed = false; this.element.on!('$destroy', () => { // The `$destroy` event may...
{ "end_byte": 14122, "start_byte": 9650, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/downgrade_component_adapter.ts" }
angular/packages/upgrade/src/common/src/security/trusted_types.ts_0_2356
/** * @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 */ /** * @fileoverview * A module to facilitate use of a Trusted Types policy internally within * the upgrade packag...
{ "end_byte": 2356, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/security/trusted_types.ts" }
angular/packages/upgrade/src/common/src/security/trusted_types_defs.ts_0_1519
/** * @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 */ /** * @fileoverview * While Angular only uses Trusted Types internally for the time being, * references to Truste...
{ "end_byte": 1519, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/common/src/security/trusted_types_defs.ts" }
angular/packages/forms/PACKAGE.md_0_1287
Implements a set of directives and providers to communicate with native DOM elements when building forms to capture user input. Use this API to register directives, build form and data models, and provide validation to your forms. Validators can be synchronous or asynchronous depending on your use case. You can also...
{ "end_byte": 1287, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/forms/PACKAGE.md" }
angular/packages/forms/BUILD.bazel_0_1858
load("//tools:defaults.bzl", "api_golden_test", "api_golden_test_npm_package", "generate_api_docs", "ng_module", "ng_package") package(default_visibility = ["//visibility:public"]) ng_module( name = "forms", srcs = glob( [ "*.ts", "src/**/*.ts", ], ), deps = [ ...
{ "end_byte": 1858, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/forms/BUILD.bazel" }
angular/packages/forms/index.ts_0_481
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ // This file is not used to build this module. It is only used during editing // by the TypeScript language service ...
{ "end_byte": 481, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/forms/index.ts" }
angular/packages/forms/public_api.ts_0_396
/** * @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 */ /** * @module * @description * Entry point for all public APIs of this package. */ export * from './src/forms'; ...
{ "end_byte": 396, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/forms/public_api.ts" }
angular/packages/forms/test/value_accessor_integration_spec.ts_0_836
/** * @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 { ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, EventEmitter, Input, Output...
{ "end_byte": 836, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/value_accessor_integration_spec.ts" }
angular/packages/forms/test/value_accessor_integration_spec.ts_838_9862
describe('value accessors', () => { function initTest<T>(component: Type<T>, ...directives: Type<any>[]): ComponentFixture<T> { TestBed.configureTestingModule({ declarations: [component, ...directives], imports: [FormsModule, ReactiveFormsModule], }); return TestBed.createComponent(component);...
{ "end_byte": 9862, "start_byte": 838, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/value_accessor_integration_spec.ts" }
angular/packages/forms/test/value_accessor_integration_spec.ts_9868_16461
describe('in template-driven forms', () => { it('with option values that are objects', fakeAsync(() => { if (isNode) return; const fixture = initTest(NgModelSelectForm); const comp = fixture.componentInstance; comp.cities = [{'name': 'SF'}, {'name': 'NYC'}, {'name': 'Buffalo'}]; ...
{ "end_byte": 16461, "start_byte": 9868, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/value_accessor_integration_spec.ts" }
angular/packages/forms/test/value_accessor_integration_spec.ts_16465_22230
describe('select multiple controls', () => { describe('in reactive forms', () => { it('should support primitive values', () => { if (isNode) return; const fixture = initTest(FormControlSelectMultiple); fixture.detectChanges(); const select = fixture.debugElement.query(By.css('...
{ "end_byte": 22230, "start_byte": 16465, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/value_accessor_integration_spec.ts" }
angular/packages/forms/test/value_accessor_integration_spec.ts_22235_32385
describe('in reactive forms', () => { it('should support basic functionality', () => { const fixture = initTest(FormControlRadioButtons); const form = new FormGroup({ 'food': new FormControl('fish'), 'drink': new FormControl('sprite'), }); fixture.componentInsta...
{ "end_byte": 32385, "start_byte": 22235, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/value_accessor_integration_spec.ts" }
angular/packages/forms/test/value_accessor_integration_spec.ts_32391_39913
describe('in template-driven forms', () => { it('should support basic functionality', fakeAsync(() => { const fixture = initTest(NgModelRadioForm); fixture.componentInstance.food = 'fish'; fixture.detectChanges(); tick(); // model -> view const inputs = fixture.deb...
{ "end_byte": 39913, "start_byte": 32391, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/value_accessor_integration_spec.ts" }
angular/packages/forms/test/value_accessor_integration_spec.ts_39917_49667
describe('custom value accessors', () => { describe('in reactive forms', () => { it('should support basic functionality', () => { const fixture = initTest(WrappedValueForm, WrappedValue); const form = new FormGroup({'login': new FormControl('aa')}); fixture.componentInstance.form = for...
{ "end_byte": 49667, "start_byte": 39917, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/value_accessor_integration_spec.ts" }
angular/packages/forms/test/value_accessor_integration_spec.ts_49669_56381
@Component({ selector: 'form-control-select-ngValue', template: ` <div [formGroup]="form"> <select formControlName="city"> <option *ngFor="let c of cities" [ngValue]="c">{{c.name}}</option> </select> </div>`, standalone: false, }) class FormControlSelectNgValue { cities = [ {id: ...
{ "end_byte": 56381, "start_byte": 49669, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/value_accessor_integration_spec.ts" }
angular/packages/forms/test/value_accessor_integration_spec.ts_56383_59480
@Component({ selector: 'cva-with-disabled-state', template: ` <div *ngIf="disabled !== undefined">CALLED WITH {{disabled ? 'DISABLED' : 'ENABLED'}}</div> <div *ngIf="disabled === undefined">UNSET</div> `, providers: [{provide: NG_VALUE_ACCESSOR, multi: true, useExisting: CvaWithDisabledState}], standa...
{ "end_byte": 59480, "start_byte": 56383, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/value_accessor_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_0_3774
/** * @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 {ɵgetDOM as getDOM} from '@angular/common'; import { Component, Directive, ElementRef, forwardRef, ...
{ "end_byte": 3774, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_3776_13580
escribe('reactive forms integration tests', () => { function initTest<T>(component: Type<T>, ...directives: Type<any>[]): ComponentFixture<T> { TestBed.configureTestingModule({ declarations: [component, ...directives], imports: [FormsModule, ReactiveFormsModule], }); return TestBed.createCompo...
{ "end_byte": 13580, "start_byte": 3776, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_13586_21098
escribe('nested control rebinding', () => { it('should attach dir to control when leaf control changes', () => { const form: FormGroup = new FormGroup({'login': new FormControl('oldValue')}); const fixture = initTest(FormGroupComp); fixture.componentInstance.form = form; fixture.de...
{ "end_byte": 21098, "start_byte": 13586, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_21102_23932
escribe('form arrays', () => { it('should support form arrays', () => { const fixture = initTest(FormArrayComp); const cityArray = new FormArray([new FormControl('SF'), new FormControl('NY')]); const form = new FormGroup({cities: cityArray}); fixture.componentInstance.form = form; fixt...
{ "end_byte": 23932, "start_byte": 21102, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_23936_34569
escribe('programmatic changes', () => { it('should update the value in the DOM when setValue() is called', () => { const fixture = initTest(FormGroupComp); const login = new FormControl('oldValue'); const form = new FormGroup({'login': login}); fixture.componentInstance.form = form; fi...
{ "end_byte": 34569, "start_byte": 23936, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_34573_38063
escribe('submit and reset events', () => { it('should emit ngSubmit event with the original submit event on submit', () => { const fixture = initTest(FormGroupComp); fixture.componentInstance.form = new FormGroup({'login': new FormControl('loginValue')}); fixture.componentInstance.event = null!; ...
{ "end_byte": 38063, "start_byte": 34573, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_38067_45651
escribe('unified form state change', () => { type UnwrapObservable<T> = T extends Observable<infer U> ? U : never; type ControlEvents<T extends AbstractControl> = UnwrapObservable<T['events']>[]; function expectValueChangeEvent<T>( event: ControlEvent<T> | undefined, value: T, sourceContr...
{ "end_byte": 45651, "start_byte": 38067, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_45657_52126
t('Nested formControl should emit touched', () => { const fc1 = new FormControl<string | null>('foo', Validators.required); const fc2 = new FormControl<string | null>('bar', Validators.required); const fg = new FormGroup({fc1, fc2}); const fc1Events: ControlEvent[] = []; const fc2Events: ...
{ "end_byte": 52126, "start_byte": 45657, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_52130_60915
escribe('setting status classes', () => { it('should not assign status on standalone <form> element', () => { @Component({ selector: 'form-comp', template: ` <form></form> `, standalone: false, }) class FormComp {} const fixture = initReactiveFo...
{ "end_byte": 60915, "start_byte": 52130, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_60921_64160
t('should apply submitted status with nested formArrayName', () => { const fixture = initTest(NestedFormArrayNameComp); const ic = new FormControl('foo'); const arr = new FormArray([ic]); const form = new FormGroup({arr}); fixture.componentInstance.form = form; fixture.detectChanges(...
{ "end_byte": 64160, "start_byte": 60921, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_64164_74077
escribe('updateOn options', () => { describe('on blur', () => { it('should not update value or validity based on user input until blur', () => { const fixture = initTest(FormControlComp); const control = new FormControl('', {validators: Validators.required, updateOn: 'blur'}); fixture....
{ "end_byte": 74077, "start_byte": 64164, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_74085_82305
t('should not emit valueChanges or statusChanges until blur', () => { const fixture = initTest(FormControlComp); const control: FormControl = new FormControl('', { validators: Validators.required, updateOn: 'blur', }); fixture.componentInstance.control = control; ...
{ "end_byte": 82305, "start_byte": 74085, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_82311_91945
escribe('on submit', () => { it('should set initial value and validity on init', () => { const fixture = initTest(FormGroupComp); const form = new FormGroup({ login: new FormControl('Nancy', {validators: Validators.required, updateOn: 'submit'}), }); fixture.componentInst...
{ "end_byte": 91945, "start_byte": 82311, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_91953_101392
t('should not emit valueChanges or statusChanges on submit if value unchanged', () => { const fixture = initTest(FormGroupComp); const control = new FormControl('', {validators: Validators.required, updateOn: 'submit'}); const formGroup = new FormGroup({login: control}); fixture.componen...
{ "end_byte": 101392, "start_byte": 91953, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_101396_107753
escribe('ngModel interactions', () => { let warnSpy: jasmine.Spy; beforeEach(() => { // Reset `_ngModelWarningSentOnce` on `FormControlDirective` and `FormControlName` types. (FormControlDirective as any)._ngModelWarningSentOnce = false; (FormControlName as any)._ngModelWarningSentOnce = fals...
{ "end_byte": 107753, "start_byte": 101396, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_107757_117370
escribe('validations', () => { it('required validator should validate checkbox', () => { const fixture = initTest(FormControlCheckboxRequiredValidator); const control = new FormControl(false, Validators.requiredTrue); fixture.componentInstance.control = control; fixture.detectChanges(); ...
{ "end_byte": 117370, "start_byte": 107757, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_117376_125399
t('should support rebound controls with rebound validators', () => { const fixture = initTest(ValidationBindingsForm); const form = new FormGroup({ 'login': new FormControl(''), 'min': new FormControl(''), 'max': new FormControl(''), 'pattern': new FormControl(''), }); ...
{ "end_byte": 125399, "start_byte": 117376, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_125405_132732
escribe('enabling validators conditionally', () => { it('should not activate minlength and maxlength validators if input is null', () => { @Component({ selector: 'min-max-length-null', template: ` <form [formGroup]="form"> <input [formControl]="control...
{ "end_byte": 132732, "start_byte": 125405, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_132738_142652
cribe('min and max validators', () => { function getComponent(dir: string): Type<MinMaxFormControlComp | MinMaxFormControlNameComp> { return dir === 'formControl' ? MinMaxFormControlComp : MinMaxFormControlNameComp; } // Run tests for both `FormControlName` and `FormControl` directives [...
{ "end_byte": 142652, "start_byte": 132738, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_142662_148190
'should run min/max validation when constraints are represented as strings', () => { const fixture = initTest(getComponent(dir)); const control = new FormControl(5); // Run tests when min and max are defined as strings. fixture.componentInstance.min = '1'; fixture.comp...
{ "end_byte": 148190, "start_byte": 142662, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_148194_156237
cribe('errors', () => { it("should throw if a form isn't passed into formGroup", () => { const fixture = initTest(FormGroupComp); expect(() => fixture.detectChanges()).toThrowError( new RegExp(`formGroup expects a FormGroup instance`), ); }); it('should throw if formControlName i...
{ "end_byte": 156237, "start_byte": 148194, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_156241_160949
cribe('radio groups', () => { it('should respect the attr.disabled state as an initial value', () => { const fixture = initTest(RadioForm); const choice = new FormControl('one'); const form = new FormGroup({'choice': choice}); fixture.componentInstance.form = form; fixture.detectChange...
{ "end_byte": 160949, "start_byte": 156241, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_160953_170459
cribe('cleanup', () => { // Symbol that indicates to the verification logic that a certain spy was not expected to be // invoked. This symbol is used by the test helpers below. const SHOULD_NOT_BE_CALLED = Symbol('SHOULD_NOT_BE_INVOKED'); function expectValidatorsToBeCalled( syncValidatorSpy: jas...
{ "end_byte": 170459, "start_byte": 160953, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_170465_178960
'should cleanup validators on a control used for multiple `formControlName` directives', () => { const fixture = initTest(NgForFormControlWithValidators, ViewValidatorA, AsyncViewValidatorA); fixture.detectChanges(); const newControl = new FormControl('b')!; const oldControl = fixture.component...
{ "end_byte": 178960, "start_byte": 170465, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_178966_187486
'should clean up callbacks when FormControlName directive is destroyed', () => { // Scenario: // --------- // [formGroup] // formControlName *ngIf // formControlName const control = new FormControl(); addOwnValidatorsAndAttachSpies(control, { viewValidators: [ViewV...
{ "end_byte": 187486, "start_byte": 178966, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_187492_194047
'should clean up controls produced by *ngFor', () => { // Scenario: // --------- // [formGroup] // [formControl] *ngFor const control = new FormControl(); addOwnValidatorsAndAttachSpies(control, { viewValidators: [ViewValidatorA, AsyncViewValidatorA], valueAccessor...
{ "end_byte": 194047, "start_byte": 187492, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_194053_201727
'should clean up when FormArrayName is destroyed (but parent FormGroup exists)', () => { // Scenario: // --------- // [formGroup] // formArrayName *ngIf // formControlName const control = new FormControl(); addOwnValidatorsAndAttachSpies(control, { viewValidators...
{ "end_byte": 201727, "start_byte": 194053, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_201733_209897
'should clean up all child controls (with *ngFor) when FormArrayName is destroyed', () => { // Scenario: // --------- // [formGroup] // formArrayName *ngIf // formControlName *ngFor const controlA = new FormControl('A'); addOwnValidatorsAndAttachSpies(controlA, { ...
{ "end_byte": 209897, "start_byte": 201733, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_209903_218181
'should clean up all child controls when FormGroup is destroyed', () => { // Scenario: // --------- // [formGroup] *ngIf // formGroupName // formControlName const control = new FormControl(); addOwnValidatorsAndAttachSpies(control, { viewValidators: [ViewValidato...
{ "end_byte": 218181, "start_byte": 209903, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/reactive_integration_spec.ts_218183_223451
mponent({ selector: 'form-control-ng-model', template: ` <input type="text" [formControl]="control" [(ngModel)]="login"> <input type="text" [formControl]="passwordControl" [(ngModel)]="password"> `, standalone: false, }) class FormControlNgModel { control!: FormControl; login!: string; passwordCon...
{ "end_byte": 223451, "start_byte": 218183, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/reactive_integration_spec.ts" }
angular/packages/forms/test/form_array_spec.ts_0_7618
/** * @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 {fakeAsync, tick} from '@angular/core/testing'; import { AbstractControl, FormArray, FormControl, For...
{ "end_byte": 7618, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/form_array_spec.ts" }
angular/packages/forms/test/form_array_spec.ts_7624_11790
describe('setValue', () => { let c: FormControl, c2: FormControl, a: FormArray; beforeEach(() => { c = new FormControl(''); c2 = new FormControl(''); a = new FormArray([c, c2]); }); it('should set its own value', () => { a.setValue(['one', 'two']); expec...
{ "end_byte": 11790, "start_byte": 7624, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/form_array_spec.ts" }
angular/packages/forms/test/form_array_spec.ts_11796_16898
describe('patchValue', () => { let c: FormControl, c2: FormControl, a: FormArray, a2: FormArray; beforeEach(() => { c = new FormControl(''); c2 = new FormControl(''); a = new FormArray([c, c2]); a2 = new FormArray([a]); }); it('should set its own value', () => {...
{ "end_byte": 16898, "start_byte": 11796, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/form_array_spec.ts" }
angular/packages/forms/test/form_array_spec.ts_16904_25679
describe('reset()', () => { let c: FormControl, c2: FormControl, a: FormArray; beforeEach(() => { c = new FormControl('initial value'); c2 = new FormControl(''); a = new FormArray([c, c2]); }); it('should set its own value if value passed', () => { a.setValue(['...
{ "end_byte": 25679, "start_byte": 16904, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/form_array_spec.ts" }
angular/packages/forms/test/form_array_spec.ts_25685_34521
describe('pending', () => { let c: FormControl; let a: FormArray; beforeEach(() => { c = new FormControl('value'); a = new FormArray([c]); }); it('should be false after creating a control', () => { expect(c.pending).toEqual(false); expect(a.pending).toEqua...
{ "end_byte": 34521, "start_byte": 25685, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/form_array_spec.ts" }
angular/packages/forms/test/form_array_spec.ts_34527_43907
describe('disable() & enable()', () => { let a: FormArray; let c: FormControl; let c2: FormControl; beforeEach(() => { c = new FormControl(null); c2 = new FormControl(null); a = new FormArray([c, c2]); }); it('should mark the array as disabled', () => { ...
{ "end_byte": 43907, "start_byte": 34527, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/form_array_spec.ts" }
angular/packages/forms/test/form_array_spec.ts_43913_50032
describe('out of bounds positive indices', () => { let c1: FormControl = new FormControl(1); let c2: FormControl = new FormControl(2); let c3: FormControl = new FormControl(3); let c4: FormControl = new FormControl(4); let c99: FormControl = new FormControl(99); let fa: FormArray; ...
{ "end_byte": 50032, "start_byte": 43913, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/form_array_spec.ts" }
angular/packages/forms/test/directives_spec.ts_0_5207
/** * @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 {SimpleChange, ɵWritable as Writable} from '@angular/core'; import {fakeAsync, flushMicrotasks, tick} from '@...
{ "end_byte": 5207, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/directives_spec.ts" }
angular/packages/forms/test/directives_spec.ts_5211_12049
escribe('formGroup', () => { let form: FormGroupDirective; let formModel: FormGroup; let loginControlDir: FormControlName; beforeEach(() => { form = new FormGroupDirective([], []); formModel = new FormGroup({ 'login': new FormControl(), 'passwords': new FormGroup({ ...
{ "end_byte": 12049, "start_byte": 5211, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/directives_spec.ts" }
angular/packages/forms/test/directives_spec.ts_12053_21191
escribe('NgForm', () => { let form: NgForm; let formModel: FormGroup; let loginControlDir: NgModel; let personControlGroupDir: NgModelGroup; beforeEach(() => { form = new NgForm([], []); formModel = form.form; personControlGroupDir = new NgModelGroup(form, [], []); personCo...
{ "end_byte": 21191, "start_byte": 12053, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/directives_spec.ts" }
angular/packages/forms/test/directives_spec.ts_21195_27355
escribe('NgModel', () => { let ngModel: NgModel; let control: FormControl; beforeEach(() => { ngModel = new NgModel( null!, [Validators.required], [asyncValidator('expected')], [defaultAccessor], ); ngModel.valueAccessor = new DummyControlValueAccessor(); ...
{ "end_byte": 27355, "start_byte": 21195, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/directives_spec.ts" }
angular/packages/forms/test/typed_integration_spec.ts_0_4423
/** * @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 */ // These tests mainly check the types of strongly typed form controls, which is generally enforced // at compile tim...
{ "end_byte": 4423, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/typed_integration_spec.ts" }
angular/packages/forms/test/typed_integration_spec.ts_4427_12204
describe('FormGroup', () => { it('supports inferred groups', () => { const c = new FormGroup({ c: new FormControl('', {nonNullable: true}), d: new FormControl(0, {nonNullable: true}), }); { type ValueType = Partial<{c: string; d: number}>; let t: ValueType = c.value...
{ "end_byte": 12204, "start_byte": 4427, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/typed_integration_spec.ts" }
angular/packages/forms/test/typed_integration_spec.ts_12210_20436
it('supports nested explicit groups', () => { const ig = new FormControl('', {nonNullable: true}); const og = new FormGroup({innerControl: ig}); const c = new FormGroup<{innerGroup: FormGroup<{innerControl: FormControl<string>}>}>({ innerGroup: og, }); { type ValueType = Pa...
{ "end_byte": 20436, "start_byte": 12210, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/typed_integration_spec.ts" }
angular/packages/forms/test/typed_integration_spec.ts_20442_24401
it('should have strongly-typed get', () => { const c = new FormGroup({ venue: new FormGroup({ address: new FormControl('2200 Bryant', {nonNullable: true}), date: new FormGroup({ day: new FormControl(21, {nonNullable: true}), month: new FormControl('March', {nonN...
{ "end_byte": 24401, "start_byte": 20442, "url": "https://github.com/angular/angular/blob/main/packages/forms/test/typed_integration_spec.ts" }