import Vide from "@rbxts/vide"; import { ControlGroup } from "../ControlTypings/ControlUtils"; import { AllControls, ControlsList, ReturnControls } from "../ControlTypings/Typing"; import { GetStoryProps, InferControlType } from "./Typing"; import { StoryBase, StoryCreationKey, StoryInfo } from "./Typing"; interface WithVide { use?: "vide"; vide: typeof Vide; } type InferVideControlGroup = { [K in keyof T]: Vide.Source>; }; type InferVideControls = { [K in keyof T]: T[K] extends ControlGroup ? InferVideControlGroup : T[K] extends AllControls ? Vide.Source> : never; }; type VideProps = { controls: T extends ReturnControls ? InferVideControls : never; }; type InferVideProps = GetStoryProps>; type VideStory = T & StoryBase & WithVide & StoryCreationKey, Vide.Node | void | undefined>;