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

Cannot build on TypeScript 4.1 #281

Closed
Half-Shot opened this issue Nov 20, 2020 · 1 comment
Closed

Cannot build on TypeScript 4.1 #281

Half-Shot opened this issue Nov 20, 2020 · 1 comment
Labels
dependencies Pull requests that update a dependency file

Comments

@Half-Shot
Copy link
Contributor

➜  matrix-appservice-bridge git:(hs/js-sdk-log) ✗ npm i

> matrix-appservice-bridge@2.3.1 prepare /home/will/git/matrix-appservice-bridge
> npm run build


> matrix-appservice-bridge@2.3.1 build /home/will/git/matrix-appservice-bridge
> tsc --project tsconfig.json

src/components/bridge-store.ts:32:9 - error TS2322: Type '() => Promise<unknown>' is not assignable to type '(objects: any[]) => Promise<any[]>'.
  Type 'Promise<unknown>' is not assignable to type 'Promise<any[]>'.
    Type 'unknown' is not assignable to type 'any[]'.

32         this.dbInsert = promisify(this.db.insert).bind(this.db);
           ~~~~~~~~~~~~~

src/components/bridge-store.ts:33:9 - error TS2322: Type '(arg1: any) => Promise<unknown>' is not assignable to type '(query: Record<string, unknown>, values: any, options: UpdateOptions) => Promise<number>'.
  Type 'Promise<unknown>' is not assignable to type 'Promise<number>'.
    Type 'unknown' is not assignable to type 'number'.

33         this.dbUpdate = promisify(this.db.update).bind(this.db);
           ~~~~~~~~~~~~~

src/components/bridge-store.ts:34:9 - error TS2322: Type '() => Promise<unknown>' is not assignable to type '(query: Record<string, unknown>, options: RemoveOptions) => Promise<number>'.
  Type 'Promise<unknown>' is not assignable to type 'Promise<number>'.

34         this.dbRemove = promisify(this.db.remove).bind(this.db);
           ~~~~~~~~~~~~~

src/utils/promiseutil.ts:27:9 - error TS2322: Type '(value: T | PromiseLike<T>) => void' is not assignable to type '(value?: T | undefined) => void'.
  Types of parameters 'value' and 'value' are incompatible.
    Type 'T | undefined' is not assignable to type 'T | PromiseLike<T>'.
      Type 'undefined' is not assignable to type 'T | PromiseLike<T>'.

27         resolve = res;
           ~~~~~~~


Found 4 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! matrix-appservice-bridge@2.3.1 build: `tsc --project tsconfig.json`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the matrix-appservice-bridge@2.3.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/will/.npm/_logs/2020-11-20T10_14_32_266Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! matrix-appservice-bridge@2.3.1 prepare: `npm run build`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the matrix-appservice-bridge@2.3.1 prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/will/.npm/_logs/2020-11-20T10_14_32_288Z-debug.log
@Half-Shot Half-Shot added bug dependencies Pull requests that update a dependency file labels Nov 20, 2020
@Half-Shot
Copy link
Contributor Author

Fixed by #295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

1 participant