diff --git a/package.json b/package.json index 49da1a1..b2f1256 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "mocha": "^9.0.1", "ts-mocha": "^9.0.2", "tslint": "^6.1.3", - "typescript": "^4.3.5", + "typescript": "^4.8.4", "typescript-formatter": "^7.2" }, "dependencies": { diff --git a/src/appservice/Api.ts b/src/appservice/Api.ts index 420cdb1..ee9ce6c 100644 --- a/src/appservice/Api.ts +++ b/src/appservice/Api.ts @@ -1,5 +1,5 @@ -import * as request from "request"; -import * as express from "express"; +import request from "request"; +import express from "express"; import * as bodyParser from "body-parser"; import { MjolnirAppService } from "./AppService"; diff --git a/src/webapis/WebAPIs.ts b/src/webapis/WebAPIs.ts index e8fae70..3b22e65 100644 --- a/src/webapis/WebAPIs.ts +++ b/src/webapis/WebAPIs.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { Server } from "http"; -import * as express from "express"; +import express from "express"; import { LogService, MatrixClient } from "matrix-bot-sdk"; import RuleServer from "../models/RuleServer"; import { ReportManager } from "../report/ReportManager"; diff --git a/test/commands/UnbanBanCommandTest.ts b/test/commands/UnbanBanCommandTest.ts index f19c897..7a3f1c3 100644 --- a/test/commands/UnbanBanCommandTest.ts +++ b/test/commands/UnbanBanCommandTest.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import * as expect from "expect"; +import expect from "expect"; import { Mjolnir } from "../../src/Mjolnir"; import { DEFAULT_LIST_EVENT_TYPE } from "../../src/commands/SetDefaultBanListCommand"; import { parseArguments } from "../../src/commands/UnbanBanCommand"; diff --git a/tsconfig.json b/tsconfig.json index 89ff648..86edea3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "alwaysStrict": true, + "esModuleInterop": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, "module": "commonjs", diff --git a/yarn.lock b/yarn.lock index b5074b2..03b9b84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3484,10 +3484,10 @@ typescript-formatter@^7.2: commandpost "^1.0.0" editorconfig "^0.15.0" -typescript@^4.3.5: - version "4.4.3" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz" - integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA== +typescript@^4.8.4: + version "4.8.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" + integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== underscore@~1.4.4: version "1.4.4"