MCPcopy Index your code
hub / github.com/formatjs/formatjs / validateInstance

Function validateInstance

packages/intl-listformat/index.ts:96–104  ·  view source on GitHub ↗
(instance: any, method: string)

Source from the content-addressed store, hash-verified

94}
95
96function validateInstance(instance: any, method: string) {
97 if (!(instance instanceof ListFormat)) {
98 throw new TypeError(
99 `Method Intl.ListFormat.prototype.${method} called on incompatible receiver ${String(
100 instance
101 )}`
102 )
103 }
104}
105
106/**
107 * https://tc39.es/proposal-intl-list-format/#sec-createstringlistfromiterable

Callers 3

formatMethod · 0.70
formatToPartsMethod · 0.70
resolvedOptionsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected