使用TS

时间:2018-07-05 01:05:20

标签: typescript typescript-typings tsc

使用TS进行编译后,我遇到运行时错误。

我收到此错误:

/home/oleg/WebstormProjects/oresoftware/live-mutex/dist/rw-client.js:23
class RWLockClient extends client_1.Client {
                                    ^

TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (/home/oleg/WebstormProjects/oresoftware/live-mutex/dist/rw-client.js:23:37)
    at Module._compile (internal/modules/cjs/loader.js:702:30)

这是加载时导致错误的文件:

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require("assert");
const client_1 = require("./client");
const index_1 = require("./index");
const shared_internal_2 = require("./shared-internal");
class RWLockClient extends client_1.Client {  //// <<<<<<< !! here is where the error occurs
   // ...
}

上面的文件正在加载此文件(client.js):

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const util = require("util");
const assert = require("assert");
const net = require("net");
const UUID = require("uuid");
const chalk_1 = require("chalk");
const json_parser_1 = require("./json-parser");
const shared_internal_1 = require("./shared-internal");
class Client {
   // ...
}

exports.Client = Client;

有人看到这个问题吗?我想不明白。我正在使用的tsconfig已经使用了很长时间,所以我怀疑是这样,但是请告诉我该信息是否有帮助。

0 个答案:

没有答案