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

Function assertString

packages/core/src/util/assert.ts:33–37  ·  view source on GitHub ↗
(actual: any, msg: string)

Source from the content-addressed store, hash-verified

31}
32
33export function assertString(actual: any, msg: string): asserts actual is string {
34 if (!(typeof actual === 'string')) {
35 throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');
36 }
37}
38
39export function assertFunction(actual: any, msg: string): asserts actual is Function {
40 if (!(typeof actual === 'function')) {

Callers 6

writeDirectStyleFunction · 0.90
writeDirectClassFunction · 0.90
i18nStartFirstCreatePassFunction · 0.90
consumeStringMethod · 0.90
ngOnChangesSetInputFunction · 0.90
textBindingInternalFunction · 0.90

Calls 1

throwErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…