Hi Manh Do, I gave a little example in BaseModel constructor, to create readonly attributes using Object.defineProperty for BirdModel. You could also use Reflect, or even Proxy depends on your case.
You could also extends or modify the code to add more function helpers like what ActiveStorage have in Rails.
The idea here is to leverage typescript declaration merging to make it possible with typescript.