Skip to content

Commit 66c47fc

Browse files
committed
fix initTimeout return type + jsdoc for better discoverability in IDE
1 parent 43496a8 commit 66c47fc

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/tracing/src/idletransaction.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,19 @@ export class IdleTransaction extends Transaction {
6969

7070
private readonly _beforeFinishCallbacks: BeforeFinishCallback[] = [];
7171

72-
// If a transaction is created and no activities are added, we want to make sure that
73-
// it times out properly. This is cleared and not used when activities are added.
74-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
75-
private _initTimeout: any;
72+
/**
73+
* If a transaction is created and no activities are added, we want to make sure that
74+
* it times out properly. This is cleared and not used when activities are added.
75+
*/
76+
private _initTimeout: ReturnType<typeof setTimeout> | undefined;
7677

7778
public constructor(
7879
transactionContext: TransactionContext,
7980
private readonly _idleHub?: Hub,
80-
// The time to wait in ms until the idle transaction will be finished. Default: 1000
81+
/**
82+
* The time to wait in ms until the idle transaction will be finished.
83+
* @default 1000
84+
*/
8185
private readonly _idleTimeout: number = DEFAULT_IDLE_TIMEOUT,
8286
// If an idle transaction should be put itself on and off the scope automatically.
8387
private readonly _onScope: boolean = false,

0 commit comments

Comments
 (0)