(expr: string)
| 341 | * change of search parameters on the page the user is already on. |
| 342 | */ |
| 343 | export function tanstackDestination(expr: string): HrefLiteral | null { |
| 344 | const args = expr.trim(); |
| 345 | const literal = args[0] === '{' ? toKeyOf(args) : readStringAt(args, 0); |
| 346 | if (literal === null) return null; |
| 347 | const path = tanstackPath(literal); |
| 348 | return path === null ? parseHrefExpression(args) : toHref(path); |
| 349 | } |
| 350 | |
| 351 | /** The `to:` value of an object destination, or null when it has none or it is computed. */ |
| 352 | function toKeyOf(args: string): string | null { |
no test coverage detected