-
Notifications
You must be signed in to change notification settings - Fork 847
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
Consider making internal SDK components private #3598
Comments
We could export interfaces instead classes where possible. This has the additional benefit that typescript doesn't complain about incompatible types just because private fields differ. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
related #4185 |
Planning for SDK 2.0...
Will double check on open issues to confirm this can be closed |
A summary:
|
Closing this as we have plans forward for everything that was not completed in SDK 2.0 |
Currently we export a lot of functions, types, objects, and classes from our core packages that we consider to be internal. This leads people to depend on these components which we do not recommend (example: https://github.com/prisma/prisma/blob/9c6e80e6fadc3068a54bc6cbff2edb218e88d345/packages/engine-core/src/tracing/createSpan.ts). As much as possible we should encourage users to use the API interfaces only.
This could be done by making them private, making the constructors private, or making all properties not included in the interface private (maybe there is some way to exclude some properties from the published types while keeping them internally?)
non-exhaustive list:
core
packageTODO:
The text was updated successfully, but these errors were encountered: