I have two variables, type and value.
type IInputType = 'text' | 'number' | 'boolean' | 'object' | 'percent' | 'time' | 'date' | 'autocomplete'
export let inputType : IInputType = 'text';
export let value: number | string | boolean = '';
I need to specify that, when inputType is text, value can only be string or number. If inputType is boolean, then value can only be of type boolean. How can I do that?