Skip to content

Commit da78f6c

Browse files
authored
docs: add @since annotation for the normalizeUrl helper (#13541)
* Update index.js * generate types
1 parent 0f82298 commit da78f6c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/kit/src/exports/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ export function isActionFailure(e) {
229229
* ```
230230
* @param {URL | string} url
231231
* @returns {{ url: URL, wasNormalized: boolean, denormalize: (url?: string | URL) => URL }}
232+
* @since 2.18.0
232233
*/
233234
export function normalizeUrl(url) {
234235
url = new URL(url, 'http://internal');

packages/kit/types/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,8 @@ declare module '@sveltejs/kit' {
20162016
* console.log(url.pathname); // /blog/post
20172017
* console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json
20182018
* ```
2019-
* */
2019+
* @since 2.18.0
2020+
*/
20202021
export function normalizeUrl(url: URL | string): {
20212022
url: URL;
20222023
wasNormalized: boolean;

0 commit comments

Comments
 (0)