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
Wodka's great work has been merged #23 and the productivity is much better now that we have typings in all the responses.
How would one proceed forward to add typings for custom fields? It is easy to override the return type per call level, but in ideal solution one would write type definitions eg. in types/chargebee.d.ts file and instruct tsconfig to look for the locally written types.
Could you please provide an example how eg. Customer & Subscription models' type definitions could be extended locally to augment custom field definitions to all the function calls in a single place?
declare module 'chargebee-typescript' {
... // What should be put here to augment type definitions for custom fields?
}
The text was updated successfully, but these errors were encountered:
Hi @jaska120, I'm sorry for the delayed response. One way to achieve this is to extend the predefined interface with a custom one. I’m sharing an example below for your reference.
Wodka's great work has been merged #23 and the productivity is much better now that we have typings in all the responses.
How would one proceed forward to add typings for custom fields? It is easy to override the return type per call level, but in ideal solution one would write type definitions eg. in
types/chargebee.d.ts
file and instruct tsconfig to look for the locally written types.Could you please provide an example how eg. Customer & Subscription models' type definitions could be extended locally to augment custom field definitions to all the function calls in a single place?
The text was updated successfully, but these errors were encountered: