We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68dca4c commit 3ff00aaCopy full SHA for 3ff00aa
1 file changed
src/polyfills.ts
@@ -13,18 +13,13 @@ declare global {
13
getOrInsert(key: K, defaultValue: V): V;
14
getOrInsertComputed<TK extends K>(key: TK, callbackFunction: (key: TK) => V): V;
15
}
16
-
17
- interface Date {
18
- toTemporalInstant(): Temporal.Instant;
19
- }
20
21
22
globalThis.Temporal = PolyfillTemporal as typeof Temporal;
23
24
// TODO: Remove this once temporal is available in Node.js, see: https://github.com/nodejs/node/issues/57127
25
if (typeof Date.prototype.toTemporalInstant !== "function") {
26
- // biome-ignore lint/suspicious/noExplicitAny: hack
27
- (Date.prototype as any).toTemporalInstant = function () {
+ Date.prototype.toTemporalInstant = function () {
28
return Temporal.Instant.fromEpochMilliseconds(this.getTime());
29
};
30
0 commit comments