Native error objects in ES2022 added a cause property.
Expected Behavior
Use native ES2022 types
Current Behavior
Typescript issues an error if the target is set to ES2022 when using Slonik.
Possible Solution
Use native ES2022 types
Steps to Reproduce
Set tsconfig target to ES2022
node_modules/slonik/src/errors.ts:133:10 - error TS2612: Property 'cause' will overwrite the base property in 'SlonikError'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.
133 public cause?: Error;
Slonik custom errors have a property
cause.
Native error objects in ES2022 added a
cause
property.Expected Behavior
Use native ES2022 types
Current Behavior
Typescript issues an error if the target is set to ES2022 when using Slonik.
Possible Solution
Use native ES2022 types
Steps to Reproduce
Set tsconfig target to ES2022
Logs