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

Function assertOneOf

packages/core/src/util/assert.ts:138–143  ·  view source on GitHub ↗
(value: any, ...validValues: any[])

Source from the content-addressed store, hash-verified

136}
137
138export function assertOneOf(value: any, ...validValues: any[]) {
139 if (validValues.indexOf(value) !== -1) return true;
140 throwError(
141 `Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`,
142 );
143}
144
145export function assertNotReactive(fn: string): void {
146 if (getActiveConsumer() !== null) {

Callers 1

i18nStartFirstCreatePassFunction · 0.90

Calls 2

indexOfMethod · 0.80
throwErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…