project.errors() returns a union of a bunch of different errors, that may have one of many prototypes. However, when you get an error it's impossible to react to which error it is exactly since you cant access the prototypes to do type-checks.
Eg:
for(const error of project.errors()) {
//apps can't do this because ModuleError is not exported
if(error instanceof ModuleError) console.warn("Error in", error.module)
}
Proposal
Expose the Error types that are part of the External API
Context
project.errors()
returns a union of a bunch of different errors, that may have one of many prototypes. However, when you get an error it's impossible to react to which error it is exactly since you cant access the prototypes to do type-checks.Eg:
Proposal
Expose the Error types that are part of the External API