TypeScript Conditional Types Good Usage Part 1

Example 1 I try to understand eventType field from Event object. But in order to use createEventGridMessage in other TypeScript file, you need to import StartEvent, InfoEvent and EndEvent types. So next example of this case looks better to me đŸ™‚ Example 1 – Updated