Skip to content

Commit 64fa186

Browse files
Update types
1 parent b2c2eba commit 64fa186

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/types/index.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
/* eslint-disable no-unused-vars */
23
import type {
34
CSSProperties,
@@ -19,7 +20,7 @@ import type { EventBusKey } from '@vueuse/core';
1920

2021

2122
// -------------------------------------------------- Types //
22-
export type FieldValue = string | boolean | number | object | [] | null | { [key: string]: string | unknown; };
23+
export type FieldValue = any;
2324
export type TimeOpened = Date | null;
2425

2526
export type GlobalDensity = VCheckbox['$props']['density'] | VSelect['$props']['density'] | VSwitch['$props']['density'] | VTextField['$props']['density'] | VTextarea['$props']['density'];
@@ -67,7 +68,7 @@ export interface SharedProps {
6768
disabled?: boolean;
6869
emptyText?: string;
6970
error?: boolean;
70-
falseValue?: boolean | string;
71+
falseValue?: boolean | string | undefined;
7172
fieldOnly?: boolean;
7273
hideDetails?: boolean;
7374
hideSaveIcon?: boolean;
@@ -93,7 +94,7 @@ export interface SharedProps {
9394
saveIcon?: string | undefined;
9495
saveIconColor?: string;
9596
tableField?: boolean;
96-
trueValue?: boolean | string;
97+
trueValue?: boolean | string | undefined;
9798
truncateLength?: number | undefined;
9899
truncateSuffix?: string | undefined;
99100
underlineColor?: string;
@@ -176,7 +177,7 @@ export interface DisplayValueProps {
176177
displayPrependInnerIcon: SharedProps['displayPrependInnerIcon'];
177178
displayPrependInnerIconColor: SharedProps['displayPrependInnerIconColor'];
178179
displayValue: any;
179-
empty?: MaybeRef<boolean> | boolean | undefined;
180+
empty?: Ref<boolean> | boolean;
180181
error?: MaybeRef<boolean> | boolean | undefined;
181182
field: string;
182183
underlineColor?: SharedProps['underlineColor'];
@@ -388,3 +389,12 @@ export interface UseConvertToUnit {
388389
}
389390
): string | void;
390391
}
392+
393+
export interface UseTruthyModelValue {
394+
(
395+
options: {
396+
modelValue: any,
397+
trueValue?: any,
398+
}
399+
): boolean;
400+
}

0 commit comments

Comments
 (0)