You can extend the entity record definitions using TypeScript's declaration merging.
For example, if you're building a plugin that displays a number of views of each comment, you can add a new numberOfViews
field to the Comment
type like this:
// In core-data
export namespace WPBaseTypes {