Skip to content

Commit 8b5bbe8

Browse files
authored
types: use globalThis instead of global for NativeDate
Fix for issue Automattic#14988 The global is defined in the @types/node package, which is not in the dependencies. Without the package, NativeDate would be interpreted as any by typescript, and resolves the types in the Schema incorrectly.
1 parent f8489e3 commit 8b5bbe8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/// <reference path="./virtuals.d.ts" />
2626
/// <reference path="./augmentations.d.ts" />
2727

28-
declare class NativeDate extends global.Date { }
28+
declare class NativeDate extends globalThis.Date { }
2929

3030
declare module 'mongoose' {
3131
import Kareem = require('kareem');

0 commit comments

Comments
 (0)