Currently the URLs can get quite messy in cases where we support both relative, server and absolute urls. E.g:
...
input:
| `${"http://" | "https://"}${string}/api/v1/${string}/subscription/plan/${string}/subscribe/`
| `/api/v1/${string}/subscription/plan/${string}/subscribe/`,
...
It would be nice if these types would look like:
TypedURL<`/api/v1/${string}/subscription/plan/${string}/subscribe/`>
This could then be generated per-project like:
export type TypedURL<T extends string> =
| `https://example.com/${T}` // Include each server URL here
| `http://${string}${T}` // Include only when absolute http URLs are enabled
| `https://${string}${T}` // Include only when absolute https URLs are enabled
| T; // Include only when relative URLs are enabled
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too