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

Throwing Errors when Transpiling from Typescript #13

Open
Fihy opened this issue Aug 2, 2024 · 0 comments
Open

Throwing Errors when Transpiling from Typescript #13

Fihy opened this issue Aug 2, 2024 · 0 comments

Comments

@Fihy
Copy link

Fihy commented Aug 2, 2024

Hey,

After installing to my typescript project, I am getting errors when attempting to transpile on windows

Here is my tsconfig.json

{
  // tsconfig
  "compilerOptions": {
    "target": "es2017",
    "module": "ES2022",
    "outDir": "./dist",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "allowSyntheticDefaultImports": true,
    "moduleResolution": "node",
    "strict": true, // Enable all strict type-checking options
    "noUnusedLocals": true, // Report errors on unused local variables
    "noUnusedParameters": false, // Report errors on unused parameters
    "noImplicitReturns": true, // Report error when not all code paths in function return a value
    "noFallthroughCasesInSwitch": true // Report errors for fallthrough cases in switch statement
  },
  "include": [
    "./src/**/*",
    ]
}
npx tsc
../node_modules/@jimp-native/plugin-blit-napi/src/index.ts:58:34 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string | Error'.

58     return throwError.call(this, err, cb);
                                   ~~~

../node_modules/@jimp-native/plugin-blit-napi/src/index.ts:64:24 - error TS2345: Argument of type '(sourceImage: Jimp, xOffset: number, yOffset: number, sourceX?: number | ImageCallback<AsyncPlugin<Blit>> | undefined, sourceY?: number | undefined, sourceW?: number | undefined, sourceH?: number | undefined, cb?: ImageCallback<...> | undefined) => any' is not assignable to parameter of type '(...args: unknown[]) => unknown'.
 Types of parameters 'sourceImage' and 'args' are incompatible.
   Type 'unknown' is not assignable to type 'Jimp'.
     Type 'unknown' is not assignable to type 'Jimp'.

64   blitAsync: wrapAsync(blit),
                         ~~~~

../node_modules/@jimp-native/plugin-blur-napi/src/index.ts:26:34 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string | Error'.

26     return throwError.call(this, err, cb);
                                   ~~~

... etc

Found 90 errors in 15 files.

Errors  Files
    2  ../node_modules/@jimp-native/plugin-blit-napi/src/index.ts:58
    2  ../node_modules/@jimp-native/plugin-blur-napi/src/index.ts:26
    2  ../node_modules/@jimp-native/plugin-circle-napi/src/index.ts:47
   26  ../node_modules/@jimp-native/plugin-color-napi/src/index.ts:46
    3  ../node_modules/@jimp-native/plugin-composite-napi/src/index.ts:2
   15  ../node_modules/@jimp-native/plugin-crop-napi/src/index.ts:44
    3  ../node_modules/@jimp-native/plugin-dither-napi/src/index.ts:23
    4  ../node_modules/@jimp-native/plugin-flip-napi/src/index.ts:5
    2  ../node_modules/@jimp-native/plugin-invert-napi/src/index.ts:18
    2  ../node_modules/@jimp-native/plugin-mask-napi/src/index.ts:40
    4  ../node_modules/@jimp-native/plugin-resize-napi/src/index.ts:51
   14  ../node_modules/@jimp-native/plugin-rotate-napi/src/index.ts:35
    1  ../node_modules/@jimp-native/utils-ts/src/cppCallbackWrapper.ts:48
    9  ../node_modules/jimp-native/src/coreMethods.ts:4
    ```
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