diff --git a/src/iam.ts b/src/iam.ts index e55e882d7..8f01e4f6f 100644 --- a/src/iam.ts +++ b/src/iam.ts @@ -177,6 +177,9 @@ export class IAM { this.id = id; } + getPolicy(gaxOpts?: CallOptions): Promise; + getPolicy(callback: GetPolicyCallback): void; + getPolicy(gaxOpts: CallOptions, callback: GetPolicyCallback): void; /** * Get the IAM policy * @@ -207,9 +210,6 @@ export class IAM { * const apiResponse = data[1]; * }); */ - getPolicy(gaxOpts?: CallOptions): Promise; - getPolicy(callback: GetPolicyCallback): void; - getPolicy(gaxOpts: CallOptions, callback: GetPolicyCallback): void; getPolicy( gaxOptsOrCallback?: CallOptions|GetPolicyCallback, callback?: GetPolicyCallback): Promise|void { @@ -232,6 +232,10 @@ export class IAM { callback!); } + setPolicy(policy: Policy, gaxOpts?: CallOptions): Promise; + setPolicy(policy: Policy, gaxOpts: CallOptions, callback: SetPolicyCallback): + void; + setPolicy(policy: Policy, callback: SetPolicyCallback): void; /** * Set the IAM policy * @@ -280,10 +284,6 @@ export class IAM { * const apiResponse = data[1]; * }); */ - setPolicy(policy: Policy, gaxOpts?: CallOptions): Promise; - setPolicy(policy: Policy, gaxOpts: CallOptions, callback: SetPolicyCallback): - void; - setPolicy(policy: Policy, callback: SetPolicyCallback): void; setPolicy( policy: Policy, gaxOptsOrCallback?: CallOptions|SetPolicyCallback, callback?: SetPolicyCallback): Promise|void { @@ -311,6 +311,13 @@ export class IAM { callback!); } + testPermissions(permissions: string|string[], gaxOpts?: CallOptions): + Promise; + testPermissions( + permissions: string|string[], gaxOpts: CallOptions, + callback: TestIamPermissionsCallback): void; + testPermissions( + permissions: string|string[], callback: TestIamPermissionsCallback): void; /** * Test a set of permissions for a resource. * @@ -371,13 +378,6 @@ export class IAM { * const apiResponse = data[1]; * }); */ - testPermissions(permissions: string|string[], gaxOpts?: CallOptions): - Promise; - testPermissions( - permissions: string|string[], gaxOpts: CallOptions, - callback: TestIamPermissionsCallback): void; - testPermissions( - permissions: string|string[], callback: TestIamPermissionsCallback): void; testPermissions( permissions: string|string[], gaxOptsOrCallback?: CallOptions|TestIamPermissionsCallback, diff --git a/src/index.ts b/src/index.ts index 47aee1c70..ebf8a3097 100644 --- a/src/index.ts +++ b/src/index.ts @@ -219,6 +219,16 @@ export class PubSub { this.Promise = this.options.promise; } } + + createSubscription( + topic: Topic|string, name: string, + options?: CreateSubscriptionOptions): Promise; + createSubscription( + topic: Topic|string, name: string, options: CreateSubscriptionOptions, + callback: CreateSubscriptionCallback): void; + createSubscription( + topic: Topic|string, name: string, + callback: CreateSubscriptionCallback): void; /** * Options for creating a subscription. * @@ -281,15 +291,6 @@ export class PubSub { * = data[1]; * }); */ - createSubscription( - topic: Topic|string, name: string, - options?: CreateSubscriptionOptions): Promise; - createSubscription( - topic: Topic|string, name: string, options: CreateSubscriptionOptions, - callback: CreateSubscriptionCallback): void; - createSubscription( - topic: Topic|string, name: string, - callback: CreateSubscriptionCallback): void; createSubscription( topic: Topic|string, name: string, optionsOrCallback?: CreateSubscriptionOptions|CreateSubscriptionCallback, @@ -347,6 +348,10 @@ export class PubSub { }); } + createTopic(name: string, gaxOpts: CallOptions): Promise; + createTopic( + name: string, gaxOpts: CallOptions, callback?: CreateTopicCallback): void; + createTopic(name: string, callback: CreateTopicCallback): void; /** * Create a topic with the given name. * @@ -376,10 +381,6 @@ export class PubSub { * const apiResponse = data[1]; * }); */ - createTopic(name: string, gaxOpts: CallOptions): Promise; - createTopic( - name: string, gaxOpts: CallOptions, callback?: CreateTopicCallback): void; - createTopic(name: string, callback: CreateTopicCallback): void; createTopic( name: string, gaxOptsOrCallback?: CallOptions|CreateTopicCallback, callback?: CreateTopicCallback): Promise|void { diff --git a/src/publisher.ts b/src/publisher.ts index 5d6f29ef2..2957c2f5a 100644 --- a/src/publisher.ts +++ b/src/publisher.ts @@ -99,6 +99,7 @@ export class Publisher { }; this.timeoutHandle_ = null; } + /** * @typedef {array} PublisherPublishResponse * @property {string} 0 The id for the message. diff --git a/src/snapshot.ts b/src/snapshot.ts index e14acae91..58150c9ca 100644 --- a/src/snapshot.ts +++ b/src/snapshot.ts @@ -165,6 +165,7 @@ export class Snapshot { this.seek = parent.seek.bind(parent, name); } } + /** * Delete the snapshot. *