Skip to content

Commit

Permalink
improve jsdoc with argument descriptions (linter complained)
Browse files Browse the repository at this point in the history
  • Loading branch information
aoberoi committed Jun 6, 2018
1 parent 22dfc6f commit af9b713
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/KeepAlive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class KeepAlive extends EventEmitter {

/**
* Start monitoring the RTMClient. This method should only be called after the client's websocket is already open.
* @param client
* @param client an RTMClient to monitor
*/
public start(client: RTMClient): void {
if (!client.connected) {
Expand Down Expand Up @@ -230,7 +230,6 @@ export class KeepAlive extends EventEmitter {
/**
* Determines if a giving incoming event can be treated as an acknowledgement for the outstanding ping, and then
* clears the ping if so.
* @param _type
* @param event any incoming slack event
*/
private attemptAcknowledgePong(_type: string, event: any): void {
Expand Down
9 changes: 4 additions & 5 deletions src/RTMClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ export class RTMClient extends EventEmitter {
*/
private static loggerName = `${pkg.name}:RTMClient`;


/**
* This object's logger instance
*/
Expand Down Expand Up @@ -350,7 +349,7 @@ export class RTMClient extends EventEmitter {
/**
* Begin an RTM session using the provided options. This method must be called before any messages can
* be sent or received.
* @param options
* @param options arguments for the start method
*/
public start(options?: methods.RTMStartArguments | methods.RTMConnectArguments): void {
// TODO: should this return a Promise<WebAPICallResult>?
Expand Down Expand Up @@ -537,7 +536,7 @@ export class RTMClient extends EventEmitter {

/**
* Set up method for the client's websocket instance. This method will attach event listeners.
* @param url
* @param url the websocket url
*/
private setupWebsocket(url: string): void {
// initialize the websocket
Expand Down Expand Up @@ -575,7 +574,7 @@ export class RTMClient extends EventEmitter {
/**
* `onmessage` handler for the client's websocket. This will parse the payload and dispatch the relevant events for
* each incoming message.
* @param websocketMessage
* @param websocketMessage an incoming message
*/
private onWebsocketMessage({ data }: { data: string }): void {
// v3 legacy
Expand Down Expand Up @@ -673,7 +672,7 @@ export interface RTMWebsocketError extends CodedError {

/**
* A factory to create RTMWebsocketError objects.
* @param original
* @param original the original error
*/
function websocketErrorWithOriginal(original: Error): RTMWebsocketError {
const error = errorWithCode(
Expand Down
3 changes: 0 additions & 3 deletions src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ export enum ErrorCode {

/**
* Factory for producing a {@link CodedError} from a generic error
*
* @param error
* @param code
*/
export function errorWithCode(error: Error, code: ErrorCode): CodedError {
const codedError = error as Partial<CodedError>;
Expand Down
4 changes: 2 additions & 2 deletions src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ function isMoreSevere(level: LogLevel, threshold: number): boolean {

/**
* INTERNAL function for transforming an external LoggerFunc type into the internal Logger interface
* @param name
* @param loggingFunc
* @param name logger name assigned by object creating the logger
* @param loggingFunc a function to call with log data
*/
export function loggerFromLoggingFunc(name: string, loggingFunc: LoggingFunc): Logger {
const logger = log.getLogger(name);
Expand Down

0 comments on commit af9b713

Please sign in to comment.