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

fix(docs): place doc comment above the last overload #393

Merged
merged 1 commit into from
Dec 7, 2018
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
28 changes: 14 additions & 14 deletions src/iam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ export class IAM {
this.id = id;
}

getPolicy(gaxOpts?: CallOptions): Promise<GetPolicyCallback>;
getPolicy(callback: GetPolicyCallback): void;
getPolicy(gaxOpts: CallOptions, callback: GetPolicyCallback): void;
/**
* Get the IAM policy
*
Expand Down Expand Up @@ -207,9 +210,6 @@ export class IAM {
* const apiResponse = data[1];
* });
*/
getPolicy(gaxOpts?: CallOptions): Promise<GetPolicyCallback>;
getPolicy(callback: GetPolicyCallback): void;
getPolicy(gaxOpts: CallOptions, callback: GetPolicyCallback): void;
getPolicy(
gaxOptsOrCallback?: CallOptions|GetPolicyCallback,
callback?: GetPolicyCallback): Promise<GetPolicyCallback>|void {
Expand All @@ -232,6 +232,10 @@ export class IAM {
callback!);
}

setPolicy(policy: Policy, gaxOpts?: CallOptions): Promise<SetPolicyResponse>;
setPolicy(policy: Policy, gaxOpts: CallOptions, callback: SetPolicyCallback):
void;
setPolicy(policy: Policy, callback: SetPolicyCallback): void;
/**
* Set the IAM policy
*
Expand Down Expand Up @@ -280,10 +284,6 @@ export class IAM {
* const apiResponse = data[1];
* });
*/
setPolicy(policy: Policy, gaxOpts?: CallOptions): Promise<SetPolicyResponse>;
setPolicy(policy: Policy, gaxOpts: CallOptions, callback: SetPolicyCallback):
void;
setPolicy(policy: Policy, callback: SetPolicyCallback): void;
setPolicy(
policy: Policy, gaxOptsOrCallback?: CallOptions|SetPolicyCallback,
callback?: SetPolicyCallback): Promise<SetPolicyResponse>|void {
Expand Down Expand Up @@ -311,6 +311,13 @@ export class IAM {
callback!);
}

testPermissions(permissions: string|string[], gaxOpts?: CallOptions):
Promise<TestIamPermissionsResponse>;
testPermissions(
permissions: string|string[], gaxOpts: CallOptions,
callback: TestIamPermissionsCallback): void;
testPermissions(
permissions: string|string[], callback: TestIamPermissionsCallback): void;
/**
* Test a set of permissions for a resource.
*
Expand Down Expand Up @@ -371,13 +378,6 @@ export class IAM {
* const apiResponse = data[1];
* });
*/
testPermissions(permissions: string|string[], gaxOpts?: CallOptions):
Promise<TestIamPermissionsResponse>;
testPermissions(
permissions: string|string[], gaxOpts: CallOptions,
callback: TestIamPermissionsCallback): void;
testPermissions(
permissions: string|string[], callback: TestIamPermissionsCallback): void;
testPermissions(
permissions: string|string[],
gaxOptsOrCallback?: CallOptions|TestIamPermissionsCallback,
Expand Down
27 changes: 14 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ export class PubSub {
this.Promise = this.options.promise;
}
}

createSubscription(
topic: Topic|string, name: string,
options?: CreateSubscriptionOptions): Promise<CreateSubscriptionResponse>;
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.
*
Expand Down Expand Up @@ -281,15 +291,6 @@ export class PubSub {
* = data[1];
* });
*/
createSubscription(
topic: Topic|string, name: string,
options?: CreateSubscriptionOptions): Promise<CreateSubscriptionResponse>;
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,
Expand Down Expand Up @@ -347,6 +348,10 @@ export class PubSub {
});
}

createTopic(name: string, gaxOpts: CallOptions): Promise<CreateTopicResponse>;
createTopic(
name: string, gaxOpts: CallOptions, callback?: CreateTopicCallback): void;
createTopic(name: string, callback: CreateTopicCallback): void;
/**
* Create a topic with the given name.
*
Expand Down Expand Up @@ -376,10 +381,6 @@ export class PubSub {
* const apiResponse = data[1];
* });
*/
createTopic(name: string, gaxOpts: CallOptions): Promise<CreateTopicResponse>;
createTopic(
name: string, gaxOpts: CallOptions, callback?: CreateTopicCallback): void;
createTopic(name: string, callback: CreateTopicCallback): void;
createTopic(
name: string, gaxOptsOrCallback?: CallOptions|CreateTopicCallback,
callback?: CreateTopicCallback): Promise<CreateTopicResponse>|void {
Expand Down
1 change: 1 addition & 0 deletions src/publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export class Publisher {
};
this.timeoutHandle_ = null;
}

/**
* @typedef {array} PublisherPublishResponse
* @property {string} 0 The id for the message.
Expand Down
1 change: 1 addition & 0 deletions src/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export class Snapshot {
this.seek = parent.seek.bind(parent, name);
}
}

/**
* Delete the snapshot.
*
Expand Down