Skip to content

Commit ade7dbc

Browse files
committed
Update to enable es6Interop.
1 parent 51c844d commit ade7dbc

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

src/cp_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { anything, anyFunction, instance, mock, verify, when } from 'ts-mockito';
22
import * as querystring from 'querystring';
3-
import * as WebSocket from 'isomorphic-ws';
3+
import WebSocket = require('isomorphic-ws');
44

55
import { CallAwaiter } from '../test';
66
import { KubeConfig } from './config';
@@ -44,7 +44,7 @@ describe('Cp', () => {
4444
it('should run extract tar command to a url', async () => {
4545
const kc = new KubeConfig();
4646
const fakeWebSocketInterface: WebSocketInterface = mock(WebSocketHandler);
47-
const fakeWebSocket: WebSocket = mock(WebSocket);
47+
const fakeWebSocket: WebSocket = mock(WebSocket) as WebSocket;
4848
const callAwaiter: CallAwaiter = new CallAwaiter();
4949
const exec = new Exec(kc, instance(fakeWebSocketInterface));
5050
const cp = new Cp(kc, exec);

src/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as request from 'request';
1+
import request = require('request');
22
import { Writable } from 'stream';
33
import { KubeConfig } from './config';
44
import { HttpError, ObjectSerializer } from './gen/api';

src/metrics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as request from 'request';
1+
import request = require('request');
22

33
import { KubeConfig } from './config';
44
import { HttpError, ObjectSerializer } from './gen/api';

src/metrics_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { fail } from 'assert';
22
import { expect } from 'chai';
3-
import * as nock from 'nock';
3+
import nock = require('nock');
44
import { KubeConfig } from './config';
55
import { V1Status, HttpError } from './gen/api';
66
import { Metrics, NodeMetricsList, PodMetricsList } from './metrics';

src/object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as http from 'http';
2-
import * as request from 'request';
2+
import request = require('request');
33
import {
44
ApisApi,
55
HttpError,

src/object_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'chai';
2-
import * as nock from 'nock';
2+
import nock = require('nock');
33
import { V1APIResource, V1APIResourceList } from './api';
44
import { KubeConfig } from './config';
55
import { KubernetesObjectApi } from './object';

src/top_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'chai';
2-
import * as nock from 'nock';
2+
import nock = require('nock');
33
import { KubeConfig } from './config';
44
import { V1Pod } from './gen/api';
55
import { Metrics, PodMetricsList } from './metrics';

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"strict": true,
1616
"forceConsistentCasingInFileNames": true,
1717
"importHelpers": true,
18-
"skipLibCheck": true
18+
"skipLibCheck": true,
19+
"esModuleInterop": true
1920
// enable this when it works with tslint, or we switch to prettier
2021
// "declarationMap": true
2122
},

0 commit comments

Comments
 (0)