MCPcopy
hub / github.com/formatjs/formatjs / defineProperty

Function defineProperty

packages/ecma402-abstract/utils.ts:87–98  ·  view source on GitHub ↗
(
  target: T,
  name: string | symbol,
  {value}: {value: any} & ThisType<any>
)

Source from the content-addressed store, hash-verified

85 [[Enumerable]]: false, [[Configurable]]: true }.
86*/
87export function defineProperty<T extends object>(
88 target: T,
89 name: string | symbol,
90 {value}: {value: any} & ThisType<any>
91): void {
92 Object.defineProperty(target, name, {
93 configurable: true,
94 enumerable: false,
95 writable: true,
96 value,
97 })
98}
99
100export function ensureIntl(): typeof Intl {
101 if (typeof Intl === 'undefined') {

Callers 15

polyfill-force.tsFile · 0.85
polyfill.tsFile · 0.85
polyfill-force.tsFile · 0.85
polyfill.tsFile · 0.85
core.tsFile · 0.85
polyfill-force.tsFile · 0.85
polyfill.tsFile · 0.85
polyfill-force.tsFile · 0.85
polyfill.tsFile · 0.85
polyfill-force.tsFile · 0.85
polyfill.tsFile · 0.85
polyfill-force.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected