Skip to content

Commit bcf6f19

Browse files
committed
add JSDoc
1 parent a79b9a0 commit bcf6f19

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/sveltekit/src/client/router.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ const DEFAULT_TAGS = {
99
};
1010

1111
/**
12+
* Automatically creates pageload and navigation transactions for the client-side SvelteKit router.
1213
*
13-
* @param startTransactionFn
14-
* @param startTransactionOnPageLoad
15-
* @param startTransactionOnLocationChange
16-
* @returns
14+
* This instrumentation makes use of SvelteKit's `page` and `navigating` stores which can be accessed
15+
* anywhere on the client side.
16+
*
17+
* @param startTransactionFn the function used to start (idle) transactions
18+
* @param startTransactionOnPageLoad controls if pageload transactions should be created (defaults to `true`)
19+
* @param startTransactionOnLocationChange controls if navigation transactions should be created (defauls to `true`)
1720
*/
1821
export function svelteKitRoutingInstrumentation<T extends Transaction>(
1922
startTransactionFn: (context: TransactionContext) => T | undefined,

0 commit comments

Comments
 (0)