refactor: Enforce no-explicit-any in design-system (no-changelog) (#4937)

👕 Enforce `no-explicit-any` in design-system
This commit is contained in:
Iván Ovejero
2022-12-15 16:27:17 +01:00
committed by GitHub
parent 4208040495
commit d7b3d649d6
4 changed files with 15 additions and 11 deletions

View File

@@ -75,12 +75,12 @@ import N8nInputLabel from '../N8nInputLabel';
import N8nCheckbox from '../N8nCheckbox';
import { getValidationError, VALIDATORS } from './validators';
import { Rule, RuleGroup, IValidator } from '../../types';
import { Rule, RuleGroup, IValidator, Validatable, FormState } from '../../types';
import { t } from '../../locale';
export interface Props {
value: any;
value: Validatable;
label: string;
infoText?: string;
required?: boolean;
@@ -112,7 +112,7 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits<{
(event: 'validate', shouldValidate: boolean): void;
(event: 'input', value: any): void;
(event: 'input', value: unknown): void;
(event: 'focus'): void;
(event: 'blur'): void;
(event: 'enter'): void;
@@ -169,7 +169,7 @@ function onBlur() {
emit('blur');
}
function onInput(value: any) {
function onInput(value: FormState) {
state.isTyping = true;
emit('input', value);
}