Interface Subscription (4.0.7)

Package

@google-cloud/pubsub

Methods

on(event, listener)

on(event: 'message', listener: (message: Message) => void): this;
Parameters
NameDescription
event 'message'
listener (message: Message) => void
Returns
TypeDescription
this

on(event, listener)

on(event: 'error', listener: (error: StatusError) => void): this;
Parameters
NameDescription
event 'error'
listener (error: StatusError) => void
Returns
TypeDescription
this

on(event, listener)

on(event: 'close', listener: () => void): this;
Parameters
NameDescription
event 'close'
listener () => void
Returns
TypeDescription
this

on(event, listener)

on(event: 'debug', listener: (msg: DebugMessage) => void): this;
Parameters
NameDescription
event 'debug'
listener (msg: DebugMessage) => void
Returns
TypeDescription
this

on(event, listener)

on(event: 'newListener', listener: (event: string | symbol, listener: Function) => void): this;
Parameters
NameDescription
event 'newListener'
listener (event: string | symbol, listener: Function) => void
Returns
TypeDescription
this

on(event, listener)

on(event: 'removeListener', listener: (event: string | symbol, listener: Function) => void): this;
Parameters
NameDescription
event 'removeListener'
listener (event: string | symbol, listener: Function) => void
Returns
TypeDescription
this

on(event, listener)

on(event: string, listener: void): this;
Parameters
NameDescription
event string
listener void
Returns
TypeDescription
this