My selection includes:
export type DocumentType =
| Item
| List
| User
export type DocumentInputType =
| ItemInputType
| ListInputType
| UserInputType
I want to develop a feature that can determine the input type based on the document type without requiring an additional generic parameter. Is this feasible?
type Documents<DocType extends DocumentType> = {
data: DocType[]
createDocument: (input: <<This is where I want the corresponding DocumentInputType>>) => void
}