Skip to content

Commit

Permalink
Merge pull request #200 from matrix-org/hs/minor-fixes
Browse files Browse the repository at this point in the history
minor type fixes
  • Loading branch information
Half-Shot authored Aug 11, 2020
2 parents 51e3ca1 + 806269f commit 329dc87
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions changelog.d/200.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed some broken typings and defer failures
2 changes: 1 addition & 1 deletion src/bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const AppService = require("matrix-appservice").AppService;
const MatrixScheduler = require("matrix-js-sdk").MatrixScheduler;

const BridgeContext = require("./components/bridge-context");
const ClientFactory = require("./components/client-factory");
const { ClientFactory } = require("./components/client-factory");
const AppServiceBot = require("./components/app-service-bot");
const RequestFactory = require("./components/request-factory").RequestFactory;
const Intent = require("./components/intent").Intent;
Expand Down
2 changes: 1 addition & 1 deletion src/components/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import * as fs from "fs";
import * as path from "path";
import path from "path";
import * as yaml from "js-yaml";
import nopt from "nopt";
import { AppServiceRegistration } from "matrix-appservice";
Expand Down
2 changes: 1 addition & 1 deletion src/components/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ export class Request<T> {
* request.
*/
public outcomeFrom(promise: Promise<unknown>) {
return promise.then(this.resolve, this.reject);
return promise.then(this.resolve.bind(this), this.reject.bind(this));
}
}
9 changes: 4 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ export * from "./components/request-factory";

export * from "./components/client-factory";
export * from "./components/intent";
export * from "./components/state-lookup";

/* eslint-disable @typescript-eslint/no-var-requires */

module.exports.AppServiceBot = require("./components/app-service-bot");
export * from "./components/state-lookup";

// Config and CLI
module.exports.Cli = require("./components/cli");
export * from "./components/cli";
module.exports.ConfigValidator = require("./components/config-validator");

// Store
Expand All @@ -44,9 +44,8 @@ module.exports.StoredEvent = require("./models/events/event");

module.exports.Bridge = require("./bridge");
module.exports.BridgeContext = require("./components/bridge-context");
module.exports.AppServiceRegistration = (
require("matrix-appservice").AppServiceRegistration
);

export * from "matrix-appservice";

const jsSdk = require("matrix-js-sdk");

Expand Down

0 comments on commit 329dc87

Please sign in to comment.