@每日英语3Understand That Code Generation Is Independent Of Types
- Code generation is independent of type system. This means that Typescript types cannot affect the runtime behavior or performance of your code.
- It is possible for a program with type errors to build code
- Typescript types are not available at runtime. To query a type at runtime, you need some way to reconstruct it. Tagged unions and property are common ways to do this. Some constructs, such as class, introduce both a Typescript type and a value that is available at runtime.
展开
评论