refactor
This commit is contained in:
parent
d27c740ab0
commit
782c9f9852
|
@ -44,10 +44,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
type SupportedTypes = 'text' | 'password' | 'email' | 'url' | 'tel' | 'number' | 'search' | 'color';
|
||||
type SupportedTypes = 'text' | 'password' | 'email' | 'url' | 'tel' | 'number' | 'search' | 'date' | 'time' | 'datetime-local' | 'color';
|
||||
type ModelValueType<T extends SupportedTypes> =
|
||||
T extends 'number' ? number :
|
||||
T extends 'text' | 'password' | 'email' | 'url' | 'tel' | 'search' | 'color' ? string :
|
||||
T extends 'text' | 'password' | 'email' | 'url' | 'tel' | 'search' | 'date' | 'time' | 'datetime-local' | 'color' ? string :
|
||||
never;
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue