Skip to content

Commit 3ff00aa

Browse files
committed
Remove types that are now shipped in ts
1 parent 68dca4c commit 3ff00aa

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/polyfills.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,13 @@ declare global {
1313
getOrInsert(key: K, defaultValue: V): V;
1414
getOrInsertComputed<TK extends K>(key: TK, callbackFunction: (key: TK) => V): V;
1515
}
16-
17-
interface Date {
18-
toTemporalInstant(): Temporal.Instant;
19-
}
2016
}
2117

2218
globalThis.Temporal = PolyfillTemporal as typeof Temporal;
2319

2420
// TODO: Remove this once temporal is available in Node.js, see: https://github.com/nodejs/node/issues/57127
2521
if (typeof Date.prototype.toTemporalInstant !== "function") {
26-
// biome-ignore lint/suspicious/noExplicitAny: hack
27-
(Date.prototype as any).toTemporalInstant = function () {
22+
Date.prototype.toTemporalInstant = function () {
2823
return Temporal.Instant.fromEpochMilliseconds(this.getTime());
2924
};
3025
}

0 commit comments

Comments
 (0)