-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This code seems to cause issues, I had to manually fix my guard check.
export interface BaseVideo<T extends VideoType = VideoType> {
type: T;
data: T extends "MOTIVATIONAL" ? MotivationalVideoData :
T extends "SHOWER_THOUGHTS" ? ShowerThoughtsVideoData :
T extends "QUIZ" ? QuizVideoData :
T extends "QUIZ_SHORT" ? QuizShortVideoData :
T extends "SUMMARY" ? any : never;
}(Yes isVideoType is included in the guards, and the other types not included in this code too)
Apart the data part, which is understandable if it gets it wrong, the guard checks if the type is equal to "T" and typescript gives me an error there.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request