diff options
author | A.J. Shulman <Shulman.aj@gmail.com> | 2024-09-05 11:40:24 -0400 |
---|---|---|
committer | A.J. Shulman <Shulman.aj@gmail.com> | 2024-09-05 11:40:24 -0400 |
commit | c1053475810a1b1b3a9963c3f1ef0b1a9509d222 (patch) | |
tree | 41da9f26592ba7f189f8d00536435182e38272da /src/client/util/History.ts | |
parent | 785e55141cab178a761080f5c99384bb19855969 (diff) | |
parent | 9014cc474a039f0daef6cc0ee2011329da7703ac (diff) |
merged with master
Diffstat (limited to 'src/client/util/History.ts')
-rw-r--r-- | src/client/util/History.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/History.ts b/src/client/util/History.ts index 52d0223d5..0d0c056a4 100644 --- a/src/client/util/History.ts +++ b/src/client/util/History.ts @@ -85,7 +85,7 @@ export namespace HistoryUtil { const parsers: { [type: string]: (pathname: string[], opts: qs.ParsedQuery) => ParsedUrl | undefined } = {}; const stringifiers: { [type: string]: (state: ParsedUrl) => string } = {}; - type ParserValue = true | 'none' | 'json' | ((value: string) => any); + type ParserValue = true | 'none' | 'json' | ((value: string) => string | null | (string | null)[]); type Parser = { [key: string]: ParserValue; @@ -106,7 +106,7 @@ export namespace HistoryUtil { return value; } parsers[type] = (pathname, opts) => { - const current: any = { type }; + const current: DocUrl & { [key: string]: null | (string | null)[] | string } = { type: 'doc', docId: '' }; for (const required in requiredFields) { if (!(required in opts)) { return undefined; @@ -148,7 +148,7 @@ export namespace HistoryUtil { path = customStringifier(state, path); } const queryObj = OmitKeys(state, keys).extract; - const query: any = {}; + const query: { [key: string]: string | null } = {}; Object.keys(queryObj).forEach(key => { query[key] = queryObj[key] === null ? null : JSON.stringify(queryObj[key]); }); |