Skip to content

Commit

Permalink
Add optional parameters notation to JSDoc (#15205)
Browse files Browse the repository at this point in the history
  • Loading branch information
arista-ms authored Jun 15, 2024
1 parent 6937f31 commit 9094099
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/dev/core/src/Misc/observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class Observer<T> {
* Creates a new observer
* @param callback defines the callback to call when the observer is notified
* @param mask defines the mask of the observer (used to filter notifications)
* @param scope defines the current scope used to restore the JS context
* @param [scope] defines the current scope used to restore the JS context
*/
constructor(
/**
Expand All @@ -97,7 +97,7 @@ export class Observer<T> {
*/
public mask: number,
/**
* Defines the current scope used to restore the JS context
* [scope] Defines the current scope used to restore the JS context
*/
public scope: any = null
) {}
Expand Down Expand Up @@ -169,12 +169,12 @@ export class Observable<T> {
/**
* Creates a new observable
* @param onObserverAdded defines a callback to call when a new observer is added
* @param notifyIfTriggered If set to true the observable will notify when an observer was added if the observable was already triggered.
* @param [notifyIfTriggered] If set to true the observable will notify when an observer was added if the observable was already triggered.
*/
constructor(
onObserverAdded?: (observer: Observer<T>) => void,
/**
* If set to true the observable will notify when an observer was added if the observable was already triggered.
* [notifyIfTriggered] If set to true the observable will notify when an observer was added if the observable was already triggered.
* This is helpful to single-state observables like the scene onReady or the dispose observable.
*/
public notifyIfTriggered = false
Expand Down

0 comments on commit 9094099

Please sign in to comment.