MCPcopy Index your code
hub / github.com/angular/angular / promiseValidator

Function promiseValidator

packages/forms/test/validators_spec.ts:472–477  ·  view source on GitHub ↗
(response: {[key: string]: any})

Source from the content-addressed store, hash-verified

470 describe('composeAsync', () => {
471 describe('promises', () => {
472 function promiseValidator(response: {[key: string]: any}): AsyncValidatorFn {
473 return (c: AbstractControl) => {
474 const res = c.value != 'expected' ? response : null;
475 return Promise.resolve(res);
476 };
477 }
478
479 it('should return null when given null', () => {
480 expect(Validators.composeAsync(null!)).toBeNull();

Callers 1

validators_spec.tsFile · 0.85

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…