Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] fix tsdoc error for param and type tag #2448

Merged
merged 8 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions AISKU/src/AISku.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,33 +626,33 @@ export class AppInsightsSku implements IApplicationInsights {

/**
* Log a user action or other occurrence.
* @param event
* @param [customProperties]
* @param event - event to be sent
* @param customProperties - properties that would be included as part of the event
*/
public trackEvent(event: IEventTelemetry, customProperties?: ICustomProperties) {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
}

/**
* Logs that a page, or similar container was displayed to the user.
* @param pageView
* @param pageView - page view to be sent
*/
public trackPageView(pageView?: IPageViewTelemetry) {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
}

/**
* Log a bag of performance information via the customProperties field.
* @param pageViewPerformance
* @param pageViewPerformance - performance information to be sent
*/
public trackPageViewPerformance(pageViewPerformance: IPageViewPerformanceTelemetry): void {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
}

/**
* Log an exception that you have caught.
* @param exception
* @param } customProperties Additional data used to filter pages and metrics in the portal. Defaults to empty.
* @param exception - exception to be sent
* @param customProperties - Additional data used to filter pages and metrics in the portal. Defaults to empty.
*/
public trackException(exception: IExceptionTelemetry, customProperties?: ICustomProperties): void {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand All @@ -661,16 +661,16 @@ export class AppInsightsSku implements IApplicationInsights {
/**
* Manually send uncaught exception telemetry. This method is automatically triggered
* on a window.onerror event.
* @param exception
* @param exception - The exception to be sent.
*/
public _onerror(exception: IAutoExceptionTelemetry): void {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
}

/**
* Log a diagnostic scenario such entering or leaving a function.
* @param trace
* @param [customProperties]
* @param trace - trace to be sent
* @param customProperties - Additional custom properties to include in the event.
*/
public trackTrace(trace: ITraceTelemetry, customProperties?: ICustomProperties): void {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand All @@ -687,7 +687,7 @@ export class AppInsightsSku implements IApplicationInsights {
* aggregating multiple measurements and sending the resulting average and modifying
* the `sampleCount` field of {@link IMetricTelemetry}.
* @param metric - input object argument. Only `name` and `average` are mandatory.
* @param [customProperties]
* @param customProperties - Additional custom properties to include in the event.
*/
public trackMetric(metric: IMetricTelemetry, customProperties?: ICustomProperties): void {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand All @@ -705,10 +705,10 @@ export class AppInsightsSku implements IApplicationInsights {
/**
* Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements.
* The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`.
* @param name The string you used as the name in startTrackPage. Defaults to the document title.
* @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.
* @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.
* @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.
* @param name - The string you used as the name in startTrackPage. Defaults to the document title.
* @param url - a relative or absolute URL that identifies the page or other item. Defaults to the window location.
* @param properties - additional data used to filter pages and metrics in the portal. Defaults to empty.
* @param measurements - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.
*/
public stopTrackPage(name?: string, url?: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number }) {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand All @@ -720,9 +720,9 @@ export class AppInsightsSku implements IApplicationInsights {

/**
* Log an extended event that you started timing with `startTrackEvent`.
* @param name The string you used to identify this event in `startTrackEvent`.
* @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.
* @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.
* @param name - The string you used to identify this event in `startTrackEvent`.
* @param properties - map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.
* @param measurements - map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.
*/
public stopTrackEvent(name: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number }) {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand All @@ -739,9 +739,9 @@ export class AppInsightsSku implements IApplicationInsights {
* Set the authenticated user id and the account id. Used for identifying a specific signed-in user. Parameters must not contain whitespace or ,;=|
*
* The method will only set the `authenticatedUserId` and `accountId` in the current page view. To set them for the whole session, you should set `storeInCookie = true`
* @param authenticatedUserId
* @param [accountId]
* @param [storeInCookie=false]
* @param authenticatedUserId - The account ID to set
* @param accountId - The account ID to set
* @param storeInCookie - Whether the values should be set for the whole session
*/
public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false): void {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand All @@ -758,7 +758,7 @@ export class AppInsightsSku implements IApplicationInsights {

/**
* Log a dependency call (e.g. ajax)
* @param dependency
* @param dependencyData dependency data object
*/
public trackDependencyData(dependency: IDependencyTelemetry): void {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand Down Expand Up @@ -806,7 +806,7 @@ export class AppInsightsSku implements IApplicationInsights {
/**
* Overwrite the lazy loaded fields of global window snippet to contain the
* actual initialized API methods
* @param snippet
* @param snippet - The global snippet
*/
public updateSnippetDefinitions(snippet: Snippet) {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand Down Expand Up @@ -935,7 +935,7 @@ export class AppInsightsSku implements IApplicationInsights {
/**
* Watches and tracks changes for accesses to the current config, and if the accessed config changes the
* handler will be recalled.
* @param handler
* @param handler - The handler to call when the config changes
* @returns A watcher handler instance that can be used to remove itself when being unloaded
*/
public onCfgChange(handler: WatcherFunction<IConfiguration>): IUnloadHook {
Expand Down
11 changes: 5 additions & 6 deletions AISKULight/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class ApplicationInsights {

/**
* Creates an instance of ApplicationInsights.
* @param config
* @param config - The configuration to use for this ApplicationInsights instance
*/
constructor(config: IConfiguration & IConfig) {
let core = new AppInsightsCore();
Expand Down Expand Up @@ -154,16 +154,15 @@ export class ApplicationInsights {

/**
* Send a manually constructed custom event
*
* @param item
* @param item - The custom event to send
*/
public track(item: ITelemetryItem) {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
}

/**
* Immediately send all batched telemetry
* @param [async=true]
* @param async - Should the flush be performed asynchronously
*/
public flush(async: boolean = true) {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand Down Expand Up @@ -199,7 +198,7 @@ export class ApplicationInsights {

/**
* Find and return the (first) plugin with the specified identifier if present
* @param pluginIdentifier
* @param pluginIdentifier - The identifier of the plugin to search for
*/
public getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T> {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand Down Expand Up @@ -258,7 +257,7 @@ export class ApplicationInsights {
/**
* Watches and tracks changes for accesses to the current config, and if the accessed config changes the
* handler will be recalled.
* @param handler
* @param handler - The handler to call when the configuration changes
* @returns A watcher handler instance that can be used to remove itself when being unloaded
*/
public onCfgChange(handler: WatcherFunction<IConfiguration>): IUnloadHook {
Expand Down
6 changes: 3 additions & 3 deletions channels/1ds-post-js/src/EventBatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class EventBatch {

/**
* Creates a new Event Batch object
* @param iKey The iKey associated with this batch of events
* @param iKey - The iKey associated with this batch of events
*/
public static create(iKey: string, theEvents?: IPostTransmissionTelemetryItem[]): EventBatch {
return new EventBatch(iKey, theEvents);
Expand Down Expand Up @@ -70,8 +70,8 @@ export class EventBatch {
/**
* Split this batch into 2 with any events > fromEvent returned in the new batch and all other
* events are kept in the current batch.
* @param fromEvent The first event to remove from the current batch.
* @param numEvents The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
* @param fromEvent - The first event to remove from the current batch.
* @param numEvents - The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
*/
public split: (fromEvent: number, numEvents?: number) => EventBatch;

Expand Down
4 changes: 2 additions & 2 deletions channels/1ds-post-js/src/HttpManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ export class HttpManager {

/**
* Add the batch of events to the queue for sending
* @param batch The batch with the events to send
* @param batch - The batch with the events to send
* @returns True if the http manager has accepted the batch (including if the batch is empty) otherwise false
*/
public addBatch(batch: EventBatch): boolean {
Expand Down Expand Up @@ -1420,7 +1420,7 @@ export class HttpManager {

/**
* Create payload data
* @param evts telemetry events
* @param evts - telemetry events
* @returns payload
*/
public createOneDSPayload(evts?: ITelemetryItem[], optimize?: boolean): IPayloadData {
Expand Down
12 changes: 6 additions & 6 deletions channels/1ds-post-js/src/PostChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -951,8 +951,8 @@ export class PostChannel extends BaseTelemetryPlugin implements IChannelControls

/**
* This is the callback method is called as part of the manual flushing process.
* @param callback
* @param sendReason
* @param callback - The callback method to call after the flush is complete
* @param sendReason - The reason why the flush is being called
*/
function _flushImpl(callback: () => void, sendReason: SendRequestReason) {
// Add any additional queued events and cause all queued events to be sent asynchronously
Expand Down Expand Up @@ -1103,8 +1103,8 @@ export class PostChannel extends BaseTelemetryPlugin implements IChannelControls

/**
* This event represents that a batch of events have been successfully sent and a response received
* @param batches The notification handler for when the batches have been successfully sent
* @param reason For this event the reason will always be EventBatchNotificationReason.Complete
* @param batches - The notification handler for when the batches have been successfully sent
* @param reason - For this event the reason will always be EventBatchNotificationReason.Complete
*/
function _eventsSentEvent(batches: EventBatch[], reason?: number) {
_notifyBatchEvents("eventsSent", batches, reason);
Expand Down Expand Up @@ -1168,9 +1168,9 @@ export class PostChannel extends BaseTelemetryPlugin implements IChannelControls
/**
* Sets the event queue limits at runtime (after initialization), if the number of queued events is greater than the
* eventLimit or autoFlushLimit then a flush() operation will be scheduled.
* @param eventLimit The number of events that can be kept in memory before the SDK starts to drop events. If the value passed is less than or
* @param eventLimit - The number of events that can be kept in memory before the SDK starts to drop events. If the value passed is less than or
* equal to zero the value will be reset to the default (10,000).
* @param autoFlushLimit When defined, once this number of events has been queued the system perform a flush() to send the queued events
* @param autoFlushLimit - When defined, once this number of events has been queued the system perform a flush() to send the queued events
* without waiting for the normal schedule timers. Passing undefined, null or a value less than or equal to zero will disable the auto flush.
*/
public setEventQueueLimits(eventLimit: number, autoFlushLimit?: number) {
Expand Down
12 changes: 6 additions & 6 deletions channels/1ds-post-js/src/Serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,12 +420,12 @@ export class Serializer {

/**
* Create a serializer payload package
* @param retryCnt The retry count for the events in this payload
* @param isTeardown Is this payload being created as part of a teardown request
* @param isSync Should this payload be sent as a synchronous request
* @param isReducedPayload Is this payload going to be sent via sendBeacon() API
* @param sendReason The reason the payload is being sent
* @param sendType Identifies how this payload will be sent
* @param retryCnt - The retry count for the events in this payload
* @param isTeardown - Is this payload being created as part of a teardown request
* @param isSync - Should this payload be sent as a synchronous request
* @param isReducedPayload - Is this payload going to be sent via sendBeacon() API
* @param sendReason - The reason the payload is being sent
* @param sendType - Identifies how this payload will be sent
*/
public createPayload(retryCnt: number, isTeardown: boolean, isSync: boolean, isReducedPayload: boolean, sendReason: SendRequestReason, sendType: EventSendType): ISerializedPayload {
// @DynamicProtoStub - DO NOT add any code as this will be removed during packaging
Expand Down
12 changes: 6 additions & 6 deletions channels/offline-channel-js/src/Helpers/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function isValidPersistenceLevel(value: EventPersistence | number): boole
/**
* Get domian from an endpoint url.
* for example, https://test.com?auth=true, will return test.com
* @param endpoint endpoint url
* @param endpoint - endpoint url
* @returns domain string
*/
export function getEndpointDomain(endpoint: string) {
Expand All @@ -47,7 +47,7 @@ export function getEndpointDomain(endpoint: string) {

/**
* If current value is equal or greater than zero.
* @param value number
* @param value - number
* @returns boolean
*/
export function isGreaterThanZero(value: number) {
Expand All @@ -62,7 +62,7 @@ const _base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+
/**
* Base64-encodes a Uint8Array.
*
* @param data the Uint8Array or string to encode.
* @param data - the Uint8Array or string to encode.
*
* @returns the base64-encoded output string.
*/
Expand Down Expand Up @@ -104,7 +104,7 @@ export function base64Encode(data: string | Uint8Array) {

/**
* Base64-decodes an encoded string and transforms it back to a Uint8Array.
* @param input the encoded string to decode
* @param input - the encoded string to decode
* @returns Uint8Array
*/
export function base64Decode(input: string) {
Expand Down Expand Up @@ -157,7 +157,7 @@ export function getTimeId(): string {
/**
* Get time value from a time id that is generated from getTimeId() function.
* For example, if time id is "12345678.randomfl", 12345678 will be returned
* @param id time id string
* @param id - time id string
* @returns time value number
*/
export function getTimeFromId(id: string) {
Expand All @@ -179,7 +179,7 @@ export function getTimeFromId(id: string) {
* Persistence level will be get from root, baseData or data in order.
* For example, if persistence level is set both in root and baseData, the root one will be returned.
* If no valid persistence level defined, normal level will be returned.
* @param item telemetry item
* @param item - telemetry item
* @returns persistent level
*/
export function getPersistence(item: ITelemetryItem | IPostTransmissionTelemetryItem): number | EventPersistence {
Expand Down
11 changes: 6 additions & 5 deletions channels/offline-channel-js/src/InMemoryBatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ export class InMemoryBatch implements IInMemoryBatch {
/**
* Split this batch into 2 with any events > fromEvent returned in the new batch and all other
* events are kept in the current batch.
* @param fromEvt The first event to remove from the current batch.
* @param numEvts The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
* @param fromEvt - The first event to remove from the current batch.

* @param numEvts - The number of events to be removed from the current batch and returned in the new one. Defaults to all trailing events
*/
public split(fromEvt: number, numEvts?: number) {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand All @@ -97,9 +98,9 @@ export class InMemoryBatch implements IInMemoryBatch {

/**
* create current buffer to a new endpoint
* @param endpoint if not defined, current endpoint will be used
* @param evts new events to be added
* @param addCurEvts if it is set to true, current itemss will be transferred to the new batch
* @param endpoint - if not defined, current endpoint will be used
* @param evts - new events to be added
* @param addCurEvts - if it is set to true, current itemss will be transferred to the new batch
*/
public createNew(endpoint: string, evts?: IPostTransmissionTelemetryItem[] | ITelemetryItem[], evtsLimitInMem?: number) {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
Expand Down
Loading
Loading