Overriding the ChatMessage class?

I've been using the "renderChatMessage" hook to render my custom chat messages, but from what I can tell, Foundry is moving to more declarative overrides with classes. Having complete control over the rendering of my chat message would be very helpful. I imagine you'd have to override the type field that the document can support, as well as its render function, but I don't know how exactly to go about it.

Using typescript, btw.
Was this page helpful?