web: fix type warnings
This commit is contained in:
parent
7a16f97908
commit
9f478bb46a
|
@ -13,7 +13,9 @@ export class Client {
|
|||
if (query) {
|
||||
const queryString = Object.keys(query)
|
||||
.filter((k) => query[k] !== null)
|
||||
.map((k) => encodeURIComponent(k) + "=" + encodeURIComponent(query[k]))
|
||||
// we default to a string in query[k] as we've filtered out the null above
|
||||
// this is just for type-hinting
|
||||
.map((k) => encodeURIComponent(k) + "=" + encodeURIComponent(query[k] || ""))
|
||||
.join("&");
|
||||
builtUrl += `?${queryString}`;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import { html, TemplateResult } from "lit-html";
|
|||
|
||||
export const SLUG_REGEX = "[-a-zA-Z0-9_]+";
|
||||
export const ID_REGEX = "\\d+";
|
||||
export const UUID_REGEX = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
|
||||
|
||||
export class Route {
|
||||
url: RegExp;
|
||||
|
|
Reference in New Issue