With Typescript 2's Tagged Union Types you can do the following interface ActionA { type: 'a'; a: string } interface ActionB { type: 'b'; b: string } type ...
確定! 回上一頁