You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should be relatively simple, but to have better TS support we should add the returned fields as typed properties on each model. This helps with autocomplete (even for JS users) and will overall tighten up the project code.
Currently the only fields being typed are mostly things that should be private to the package:
A solution could be to create an interface for RowFields or something like that which has all of the fields returned from the Coda API. This interface can be used to type the create/update methods instead of using any:
It's possible that we may need to add the fields to the main model as well as have interfaces for each individual CRUD operation that needs it though, in case some take different options.
We'll also want to mark some of the current fields as private so that they aren't exposed outside of the package.
The text was updated successfully, but these errors were encountered:
This should be relatively simple, but to have better TS support we should add the returned fields as typed properties on each model. This helps with autocomplete (even for JS users) and will overall tighten up the project code.
Currently the only fields being typed are mostly things that should be private to the package:
coda-js/src/models/Row.ts
Lines 4 to 9 in 330c170
A solution could be to create an interface for
RowFields
or something like that which has all of the fields returned from the Coda API. This interface can be used to type the create/update methods instead of usingany
:coda-js/src/models/Row.ts
Line 28 in 330c170
It's possible that we may need to add the fields to the main model as well as have interfaces for each individual CRUD operation that needs it though, in case some take different options.
We'll also want to mark some of the current fields as private so that they aren't exposed outside of the package.
The text was updated successfully, but these errors were encountered: