Skip to content

Improve internal type safety #43

@adamjkb

Description

@adamjkb

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) {
   // ...
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions