Skip to content

Commit 66cce03

Browse files
committed
lib: add Temporal to frozen intrinsics
Signed-off-by: Renegade334 <[email protected]>
1 parent 8173251 commit 66cce03

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

lib/internal/freeze_intrinsics.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ const {
132132
const {
133133
Intl,
134134
SharedArrayBuffer,
135+
Temporal,
135136
WebAssembly,
136137
} = globalThis;
137138

@@ -372,6 +373,20 @@ module.exports = function() {
372373
ArrayPrototypePush(intrinsics, Intl);
373374
}
374375

376+
if (typeof Temporal !== 'undefined') {
377+
ArrayPrototypePush(intrinsicPrototypes,
378+
Temporal.Duration.prototype,
379+
Temporal.Instant.prototype,
380+
Temporal.PlainDate.prototype,
381+
Temporal.PlainDateTime.prototype,
382+
Temporal.PlainMonthDay.prototype,
383+
Temporal.PlainTime.prototype,
384+
Temporal.PlainYearMonth.prototype,
385+
Temporal.ZonedDateTime.prototype,
386+
);
387+
ArrayPrototypePush(intrinsics, Temporal);
388+
}
389+
375390
ArrayPrototypeForEach(intrinsicPrototypes, enableDerivedOverrides);
376391

377392
const frozenSet = new WeakSet();

0 commit comments

Comments
 (0)