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

How to use this tool? #3

Open
flyinghuman opened this issue Mar 23, 2021 · 0 comments
Open

How to use this tool? #3

flyinghuman opened this issue Mar 23, 2021 · 0 comments

Comments

@flyinghuman
Copy link

Hello,

first of all: thanks for providing this tool. Can you please describe how to use it?

On Ubuntu Linux i cloned the repo; installed libfuse-dev; installed the node-dependencies with npm install and i did a npm run build -> i get compile error in compression.ts

npm run build

> acronis-tib@0.0.1 build home/blah/acronis-tib/acronis-tib
> tsc --project .

src/compression.ts:43:3 - error TS2322: Type 'Promise<unknown>' is not assignable to type 'Promise<{}>'.
  Type 'unknown' is not assignable to type '{}'.

43      promise: p,
        ~~~~~~~

  src/compression.ts:11:77
    11 function getInflaterErrorHandler(inflater: zlib.Inflate|zlib.InflateRaw): { promise: Promise<{}>; cleanup: () => void } {
                                                                                   ~~~~~~~
    The expected type comes from property 'promise' which is declared here on type '{ promise: Promise<{}>; cleanup: () => void; }'


Found 1 error.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! acronis-tib@0.0.1 build: `tsc --project .`
npm ERR! Exit status 2

When i try to only run tsc --project . i get even more compile errors.

tsc --project .
src/compression.ts:27:4 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?

27    res();
      ~~~~~

  ../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts:33:34
    33     new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~
    An argument for 'value' was not provided.

src/compression.ts:43:3 - error TS2322: Type 'Promise<unknown>' is not assignable to type 'Promise<{}>'.
  Type 'unknown' is not assignable to type '{}'.

43   promise: p,
     ~~~~~~~

  src/compression.ts:11:77
    11 function getInflaterErrorHandler(inflater: zlib.Inflate|zlib.InflateRaw): { promise: Promise<{}>; cleanup: () => void } {
                                                                                   ~~~~~~~
    The expected type comes from property 'promise' which is declared here on type '{ promise: Promise<{}>; cleanup: () => void; }'

src/compression.ts:110:51 - error TS2345: Argument of type '(value: unknown) => void' is not assignable to parameter of type '() => void'.

110       inflater.flush(zlib.constants.Z_FULL_FLUSH, res);
                                                      ~~~

src/compression.ts:126:18 - error TS2345: Argument of type '(value: unknown) => void' is not assignable to parameter of type '() => void'.

126   inflater.close(res);
                     ~~~


Found 4 errors.

I tried Node v4.2.6 or 10.19.0 (Ubuntu 16.04 or 20.04)

Any help would be good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant