mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Fix of React SyntheticEvent.timeStamp property type (#15165)
The `timeStamp` property of events is a numeric value in milliseconds, not a `Date`. https://developer.mozilla.org/en-US/docs/Web/API/Event/timeStamp
This commit is contained in:
2
react/index.d.ts
vendored
2
react/index.d.ts
vendored
@@ -289,7 +289,7 @@ declare namespace React {
|
||||
persist(): void;
|
||||
// If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/12239
|
||||
target: EventTarget;
|
||||
timeStamp: Date;
|
||||
timeStamp: number;
|
||||
type: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user