export function urlPath(strings: TemplateStringsArray, ...params: readonly (URLPathInput | URLPath)[]) {
  let inputs: URLPathComponentInput[] = [];
  for (let index = 0; index < strings.length; index += 1) {
    let text = strings[index]
    let param = params[index]
    inputs.push(text)
    if (param != null) {
      if (param instanceof URLPath) {
        inputs.push(param)
      } else {
        inputs.push(escapeURLPathInput(param))
      }
    }
  }
  return new URLPath(...inputs)
}