why TypeScript doesn't support Type.property
in addtion to lookup types like Type['property']
I find the former much more readable, but I guess there must be a reason why it's not supported.
for reference, here are two issues in which this is discussed
the TLDR version is that it would conflict with namespaces
- https://github.com/microsoft/TypeScript/issues/30815
- https://github.com/Microsoft/TypeScript/issues/12962
it's real shame both issues have been closed.
CodePudding user response:
According to Typescript maintainer Ryan Cavanaugh, this is working as intended.
See this GitHub issue: https://github.com/microsoft/TypeScript/issues/30815