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

Function assertNumberInRange

packages/core/src/util/assert.ts:23–31  ·  view source on GitHub ↗
(
  actual: any,
  minInclusive: number,
  maxInclusive: number,
)

Source from the content-addressed store, hash-verified

21}
22
23export function assertNumberInRange(
24 actual: any,
25 minInclusive: number,
26 maxInclusive: number,
27): asserts actual is number {
28 assertNumber(actual, 'Expected a number');
29 assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');
30 assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');
31}
32
33export function assertString(actual: any, msg: string): asserts actual is string {
34 if (!(typeof actual === 'string')) {

Callers 4

enterIcuFunction · 0.90
toTStylingRangeFunction · 0.90
setTStylingRangePrevFunction · 0.90
setTStylingRangeNextFunction · 0.90

Calls 3

assertNumberFunction · 0.85
assertLessThanOrEqualFunction · 0.85
assertGreaterThanOrEqualFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…