refactor: unifies spread types in their proper places #2075
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is the last part of the TypeScript refactoring (#2072).
As before in #2067, the final usage is unaffected by these changes.
Unifying the types
Pool
as exampleAll
Pool
types spread across theindex.d.ts
,typings/mysql/index.d.ts
andtypings/mysql/lib/Pool.d.ts
have been unified in "typings/mysql/lib/Pool.d.ts".About the approach of reusable
query
andexecute
overloadsexecute
as examplequery
overloadsI moved all variations (overloads) of the
execute
around the types into "typings/mysql/lib/protocol/sequences/ExecutableBase.ts".Pool
as example is a class, not an interface, so I did theExecutableBase
as an Anonymous Class.For example:
How this works in practice:
Before

After

Notes