I've been looking into a system sorta like this but something where we could return a class like Entity. where calling anything on the entity that requires validation would automatically throw a typescript error unless you do Entity.isValid before it.
But what it would allow you to do is have full type safety when dealing with entity, and also other such components with isValid. I haven't been able to fully develop it yet but it would be cool for you to look into it.