github-actions
released this
25 Nov 09:15
·
243 commits
to main
since this release
Minor Changes
-
#1333
734a62d
Thanks @mrlubos! - feat: add buildUrl() methodBuild URL
::: warning
To use this feature, you must opt in to the experimental parser.
:::If you need to access the compiled URL, you can use the
buildUrl()
method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.type FooData = { path: { fooId: number; }; query?: { bar?: string; }; url: '/foo/{fooId}'; }; const url = client.buildUrl<FooData>({ path: { fooId: 1, }, query: { bar: 'baz', }, url: '/foo/{fooId}', }); console.log(url); // prints '/foo/1?bar=baz'