0
Follow
2
View

Typing custom event with typescript

dreamwing0324 注册会员
2023-01-26 10:55

I use this often in the case of event callbacks, particularly when third party libraries are involved.

For some more details see "TypeScript Deep Dive"'s section on double assertions (github mirror)

 (
          
        )
      },
    }} 
/>

I don't consider this particularly ideal for some reason. Maybe the nature of events and third party libraries will leave the user no choice.

There are two cases I can think of recently that in the official docs that may interest those reading into unknown:

About the Author

Question Info

Publish Time
2023-01-26 10:55
Update Time
2023-01-26 10:55