TSM-06: convert Group A services to TypeScript - #563
TSM-06: convert Group A services to TypeScript#563Justin Hammond (Justintime50) wants to merge 14 commits into
Conversation
ea893f6 to
66869ff
Compare
66869ff to
8a875f7
Compare
8a875f7 to
bf2cfcf
Compare
bf2cfcf to
7bab25e
Compare
7bab25e to
ca4ccd5
Compare
ca4ccd5 to
92acfde
Compare
92acfde to
44b5d7b
Compare
44b5d7b to
f1023c7
Compare
Alex Matthews (ralexmatthews)
left a comment
There was a problem hiding this comment.
Hmmm... this looks like its more of a "just adding types for the sake of adding types" and less like implementing typescript checking. Lots of unknowns, anys, and general type omissions. I see lots of places where we introduce more any's, and while we technically have "explicit parameter and return types", I don't think most of them are actually helpful. So many are just
(params: Record<string, unknown>): Promise<unknown>
I might not be getting the point of this, and they are typed in the ./types/ directory. I don't know if we want to implement those in the source directly instead, or treat those as the source of truth or what, but it feels divergent.
| const url = 'addresses'; | ||
|
|
||
| const wrappedParams = {}; | ||
| const wrappedParams: Record<string, unknown> = {}; |
There was a problem hiding this comment.
nit:
Looks like this is a known type, and could probably strengthen it just a little bit.
type MetaAddressKeys = "verify" | "verify_strict" | "verify_carrier";
type AddressCreateInternalParameters =
{ address?: Omit<AddressCreateParameters, MetaAddressKeys> } &
Pick<AddressCreateParameters, MetaAddressKeys>;| * @returns {Object} - An object containing a list of {@link Address addresses} and pagination information. | ||
| */ | ||
| static async all(params = {}) { | ||
| static async all(params: Record<string, unknown> = {}): Promise<unknown> { |
There was a problem hiding this comment.
nit:
Do we really not know what these return? It feels like these should be known.
Summary
Converts Group A service modules to TypeScript and applies minimal typed compatibility fixes needed for the current base-service conversion, with runtime behavior preserved.
Changes in this PR
Testing
Notes