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: improve types, remove dead code #340

Merged
merged 1 commit into from
Nov 2, 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
1 change: 0 additions & 1 deletion src/bundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
'use strict';

import * as _ from 'lodash';
import * as util from 'util';
import {NormalApiCaller, APICall, PromiseCanceller, APICallback} from './api_callable';
import {GoogleError} from './GoogleError';
import {CallSettings} from './gax';
Expand Down
8 changes: 2 additions & 6 deletions src/grpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const COMMON_PROTO_FILES =
export {GrpcObject} from 'grpc';

export interface GrpcClientOptions extends GoogleAuthOptions {
auth: GoogleAuth;
auth?: GoogleAuth;
promise?: PromiseConstructor;
grpc?: GrpcModule;
}
Expand Down Expand Up @@ -135,11 +135,7 @@ export class GrpcClient {
* promises will be used.
* @constructor
*/
constructor(options: GrpcClientOptions) {
// if (!(this instanceof GrpcClient)) {
// return new GrpcClient(options);
// }
options = options || {};
constructor(options: GrpcClientOptions = {}) {
this.auth = options.auth || new GoogleAuth(options);
this.promise = options.promise || Promise;
if ('grpc' in options) {
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export {BundleDescriptor, BundleExecutor} from './bundling';
export {PathTemplate} from './path_template';
export {PageDescriptor} from './paged_iteration';
export {createApiCall} from './api_callable';
export {GoogleError} from './GoogleError';
export {ClientStub, ClientStubOptions, GrpcClient, GrpcClientOptions, GrpcModule, GrpcObject, GoogleProtoFilesRoot, Metadata, MetadataValue} from './grpc';

function lro(options: GrpcClientOptions) {
Expand Down
3 changes: 0 additions & 3 deletions src/longrunning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import * as events from 'events';
import {EventEmitter} from 'events';
import * as util from 'util';

import {APICall, APICallback, CancellablePromise, NormalApiCaller, PromiseCanceller} from './api_callable';
import {BackoffSettings, CallOptions, createBackoffSettings} from './gax';
import {GoogleError} from './GoogleError';
Expand Down
1 change: 0 additions & 1 deletion src/operations_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
/* jscs: disable maximumLineLength */
'use strict';

import * as path from 'path';
import * as extend from 'extend';
import * as apiCallable from './api_callable';
import * as gax from './gax';
Expand Down
7 changes: 0 additions & 7 deletions system-test/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,11 @@ import * as rimraf from 'rimraf';
import * as util from 'util';

const mkdir = util.promisify(fs.mkdir);
const readFile = util.promisify(fs.readFile);
const writeFile = util.promisify(fs.writeFile);
const rmrf = util.promisify(rimraf);

const baseRepoUrl = 'https://github.com/googleapis/';
const gaxPath = process.cwd();
const testDir = path.join(process.cwd(), 'system-test-run');

interface PackageJson {
dependencies: {[name: string]: string;};
}

interface ExecuteResult {
stdout: string;
stderr: string;
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"rootDir": ".",
"outDir": "build",
"noImplicitAny": false,
"noImplicitThis": false,
"target": "es5"
"noImplicitThis": false
},
"include": [
"src/*.ts",
Expand Down