In my opinion, this is overall a more "typescript" like approach of the problem. Furthermore, the typescript "compiler" will help us later on, since we have a guaranteed value type which leave no room for speculation (other than any) and therefore provide a type safe interface for accessing members.
In my opinion, this is overall a more "typescript" like approach of the problem. Furthermore, the typescript "compiler" will help us later on, since we have a guaranteed value type which leave no room for speculation (other than
any
) and therefore provide a type safe interface for accessing members.