Skip to content

Commit

Permalink
Enable gts fix (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Sep 6, 2018
1 parent 9ebae03 commit 8457257
Show file tree
Hide file tree
Showing 12 changed files with 753 additions and 812 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].

```javascript
// Imports the Google Cloud client library
const DNS = require('@google-cloud/dns');
const {DNS} = require('@google-cloud/dns');

// Your Google Cloud Platform project ID
const projectId = 'YOUR_PROJECT_ID';
Expand Down
4 changes: 3 additions & 1 deletion packages/google-cloud-dns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"scripts": {
"docs": "jsdoc -c .jsdoc.js",
"generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json",
"lint": "echo lint not enabled 👻 # gts check && eslint samples/",
"lint": "gts check && eslint samples/",
"test": "nyc mocha build/test",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"presystem-test": "npm run compile",
Expand Down Expand Up @@ -81,6 +81,8 @@
"@types/mocha": "^5.2.5",
"@types/node": "^10.9.4",
"@types/proxyquire": "^1.3.28",
"@types/request": "^2.47.1",
"@types/tmp": "0.0.33",
"@types/uuid": "^3.4.4",
"async": "^2.6.1",
"codecov": "^3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-dns/samples/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// [START dns_quickstart]
// Imports the Google Cloud client library
const DNS = require('@google-cloud/dns');
const {DNS} = require('@google-cloud/dns');

// Your Google Cloud Platform project ID
const projectId = 'YOUR_PROJECT_ID';
Expand Down
22 changes: 12 additions & 10 deletions packages/google-cloud-dns/src/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ import {promisifyAll} from '@google-cloud/promisify';
* @param {string} id ID of the change.
*
* @example
* const DNS = require('@google-cloud/dns');
* const {DNS} = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
*/
export class Change extends ServiceObject {
constructor(zone, id) {
constructor(zone, id?) {
const methods = {
/**
* @typedef {array} ChangeExistsResponse
Expand All @@ -52,7 +52,7 @@ export class Change extends ServiceObject {
* @returns {Promise<ChangeExistsResponse>}
*
* @example
* const DNS = require('@google-cloud/dns');
* const {DNS} = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
Expand Down Expand Up @@ -81,10 +81,10 @@ export class Change extends ServiceObject {
/**
* Get a change if it exists.
*
* You may optionally use this to "get or create" an object by providing an
* object with `autoCreate` set to `true`. Any extra configuration that is
* normally required for the `create` method must be contained within this
* object as well.
* You may optionally use this to "get or create" an object by providing
* an object with `autoCreate` set to `true`. Any extra configuration that
* is normally required for the `create` method must be contained within
* this object as well.
*
* @method Change#get
* @param {options} [options] Configuration object.
Expand All @@ -94,7 +94,7 @@ export class Change extends ServiceObject {
* @returns {Promise<GetChangeResponse>}
*
* @example
* const DNS = require('@google-cloud/dns');
* const {DNS} = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
Expand Down Expand Up @@ -133,7 +133,7 @@ export class Change extends ServiceObject {
* @returns {Promise<GetChangeMetadataResponse>}
*
* @example
* const DNS = require('@google-cloud/dns');
* const {DNS} = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
Expand Down Expand Up @@ -180,6 +180,7 @@ export class Change extends ServiceObject {
*/
id,
methods,
// tslint:disable-next-line:no-any
requestModule: teenyRequest as any,
});
}
Expand All @@ -192,7 +193,7 @@ export class Change extends ServiceObject {
* @returns {Promise<CreateChangeResponse>}
*
* @example
* const DNS = require('@google-cloud/dns');
* const {DNS} = require('@google-cloud/dns');
* const dns = new DNS();
* const zone = dns.zone('zone-id');
* const change = zone.change('change-id');
Expand All @@ -218,6 +219,7 @@ export class Change extends ServiceObject {
* });
*/
create(config, callback?) {
// tslint:disable-next-line:no-any
(this.parent as any).createChange(config, (err, change, apiResponse) => {
if (err) {
callback(err, null, apiResponse);
Expand Down
Loading

0 comments on commit 8457257

Please sign in to comment.