When using nx to generate a Javascript library, the tsconfig it generates does not allow to use newer language/platform versions, for examle the Error constructor:
export class SomeCustomError extends Error {
constructor(message: string, err?: Error) {
super(message, { cause: err }) // <--- it will complain about 'cause' here
this.name = this.constructor.name
}
}