MCPcopy Create free account
hub / github.com/angular/angular / assertIsArray

Function assertIsArray

packages/compiler/src/template/pipeline/src/ingest.ts:1929–1933  ·  view source on GitHub ↗

* Assert that the given value is an array.

(value: any)

Source from the content-addressed store, hash-verified

1927 * Assert that the given value is an array.
1928 */
1929function assertIsArray<T>(value: any): asserts value is Array<T> {
1930 if (!Array.isArray(value)) {
1931 throw new Error(`AssertionError: expected an array`);
1932 }
1933}
1934
1935/**
1936 * Creates an absolute `ParseSourceSpan` from the relative `ParseSpan`.

Callers 1

ingestReferencesFunction · 0.85

Calls 1

isArrayMethod · 0.80

Tested by

no test coverage detected