Improve internal type safety
Opened this issue · 0 comments
adamjkb commented
The extension's internal type safety isn't the best it could be. There are a lot of red squigglies. This is part due to Prisma.getExtensionContext
not really providing much of a context really other than the 'name' property. While technically it is possible to do client[ctx.name].<prismaMethodName>()
it isn't really the whole story. Prisma will likely provide better tools in the future.
There are also a decent amount of squigglies because of a "non typescript" way of going about internal variable assignment. Thinking of:
/** @type {string} */
let path
if (node) {
path = node.path
// ...
} else if (where) {
// ...
}