acronis-tib
acronis-tib copied to clipboard
How to use this tool?
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
> [email protected] 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! [email protected] 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!