Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve internal type safety #43

Open
adamjkb opened this issue Jul 16, 2023 · 0 comments
Open

Improve internal type safety #43

adamjkb opened this issue Jul 16, 2023 · 0 comments
Labels

Comments

@adamjkb
Copy link
Owner

adamjkb commented Jul 16, 2023

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) {
   // ...
}
@adamjkb adamjkb added good first issue Good for newcomers typescript labels Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant