Skip to content

Commit

Permalink
refactor(typescript): noImplicityAny for topic.ts and subscription.ts (
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenqlogic authored and Praveen Kumar Singh committed Jan 30, 2019
1 parent b38d71a commit 8489293
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
5 changes: 0 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ const opts = {} as gax.GrpcClientOptions;
const {grpc} = new gax.GrpcClient(opts);


export interface SnapshotParent extends PubSub {
createSnapshot?: Function;
seek?: Function;
}

export interface GetSubscriptionMetadataCallback {
(err: ServiceError|null, res?: google.pubsub.v1.Subscription|null): void;
}
Expand Down
8 changes: 2 additions & 6 deletions src/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ export class Subscription extends EventEmitter {
constructor(pubsub: PubSub, name: string, options?: SubscriptionCallOptions) {
super();



options = options || {};

this.pubsub = pubsub;
Expand Down Expand Up @@ -294,7 +296,6 @@ export class Subscription extends EventEmitter {
* // If the callback is omitted a Promise will be returned.
* subscription.close().then(() => {});
*/

close(): Promise<void>;
close(callback: RequestCallback<void>): void;
close(callback?: RequestCallback<void>): void|Promise<void> {
Expand Down Expand Up @@ -425,8 +426,6 @@ export class Subscription extends EventEmitter {
typeof gaxOptsOrCallback === 'object' ? gaxOptsOrCallback : {};
callback =
typeof gaxOptsOrCallback === 'function' ? gaxOptsOrCallback : callback;


callback = callback || noop;
const reqOpts = {
subscription: this.name,
Expand Down Expand Up @@ -794,9 +793,6 @@ export class Subscription extends EventEmitter {

if (typeof snapshot === 'string') {
reqOpts.snapshot = Snapshot.formatName_(this.pubsub.projectId, snapshot);



} else if (is.date(snapshot)) {
reqOpts.time = snapshot as Date;
} else {
Expand Down

0 comments on commit 8489293

Please sign in to comment.