MCPcopy
hub / github.com/formatjs/formatjs / validateInstance

Function validateInstance

packages/intl-pluralrules/index.ts:41–49  ·  view source on GitHub ↗
(instance: any, method: string)

Source from the content-addressed store, hash-verified

39}
40
41function validateInstance(instance: any, method: string) {
42 if (!(instance instanceof PluralRules)) {
43 throw new TypeError(
44 `Method Intl.PluralRules.prototype.${method} called on incompatible receiver ${String(
45 instance
46 )}`
47 )
48 }
49}
50
51export interface PluralRulesInternal extends NumberFormatDigitInternalSlots {
52 initializedPluralRules: boolean

Callers 3

resolvedOptionsMethod · 0.70
selectMethod · 0.70
selectRangeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected