permissionless.js icon indicating copy to clipboard operation
permissionless.js copied to clipboard

This member cannot have an 'override' modifier because it is not declared in the base class 'BaseError'.

Open denys5dev opened this issue 1 year ago • 2 comments

I catch an error during compilation. Do you have any idea what can be a reason and how to fix it ? Thank you.

Error: node_modules/permissionless/errors/estimateUserOperationGas.ts:13:14 - error TS4113: This member cannot have an 'override' modifier because it is not declared in the base class 'BaseError'.

13     override cause: BaseError
                ~~~~~


Error: node_modules/permissionless/errors/sendUserOperation.ts:13:14 - error TS4113: This member cannot have an 'override' modifier because it is not declared in the base class 'BaseError'.

13     override cause: BaseError
                ~~~~~

Deps

"permissionless": "^0.1.22",
"typescript": "5.3.3"

denys5dev avatar Apr 30 '24 10:04 denys5dev

What is your target in tsconfig?

plusminushalf avatar Apr 30 '24 11:04 plusminushalf

Initially "target": "es2022"

but looks like to fix it also need to add lib prop with


"lib": [
      "ES2022",
      "dom"
    ]

then it works fine

denys5dev avatar Apr 30 '24 13:04 denys5dev

This seems to work for me

"lib": [
      "ES2022",
      "DOM"
    ]

Initially "target": "es2022"

but looks like to fix it also need to add lib prop with


"lib": [
      "ES2022",
      "dom"
    ]

then it works fine

garantor avatar Apr 17 '25 11:04 garantor