mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
[history] Mark Location's key as optional (#20447)
While the `key` will always be a string value after updating history, it will not be present when the `history` object is first created, at least until the first push/replace state happens.
This commit is contained in:
2
types/history/index.d.ts
vendored
2
types/history/index.d.ts
vendored
@@ -28,7 +28,7 @@ export interface Location {
|
||||
search: Search;
|
||||
state: LocationState;
|
||||
hash: Hash;
|
||||
key: LocationKey;
|
||||
key?: LocationKey;
|
||||
}
|
||||
|
||||
export interface LocationDescriptorObject {
|
||||
|
||||
Reference in New Issue
Block a user