Typescript: How to inference a string letteral param type and use it on another param type

后端 未结 0 1213
忘了有多久
忘了有多久 2021-01-18 03:07

Here an example that explain what i\'m asking!

// Given an events definition

interface IEventDef {
    event1: () => void,
    event2: (data: T) => voi         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题