From f83dc52610fc71ced3075c858c119f89db6aee48 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 30 Mar 2022 16:44:45 +0200 Subject: [PATCH] (type) fix typing issues --- app/frontend/src/javascript/components/base/rhf-input.tsx | 5 +++-- .../src/javascript/components/base/text-editor/iframe.tsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/frontend/src/javascript/components/base/rhf-input.tsx b/app/frontend/src/javascript/components/base/rhf-input.tsx index 941bd5b88..152e477bd 100644 --- a/app/frontend/src/javascript/components/base/rhf-input.tsx +++ b/app/frontend/src/javascript/components/base/rhf-input.tsx @@ -1,5 +1,6 @@ import React, { ReactNode } from 'react'; import { FieldErrors, UseFormRegister, Validate } from 'react-hook-form'; +import { FieldValues } from 'react-hook-form/dist/types/fields'; type inputType = string|number|readonly string []; type ruleTypes = { @@ -9,12 +10,12 @@ type ruleTypes = { maxLenght?: number, min?: number, max?: number, - validate?: Validate; + validate?: Validate; }; interface RHFInputProps { id: string, - register: UseFormRegister, + register: UseFormRegister, label?: string, tooltip?: string, defaultValue?: inputType, diff --git a/app/frontend/src/javascript/components/base/text-editor/iframe.tsx b/app/frontend/src/javascript/components/base/text-editor/iframe.tsx index 0263800f9..8ef646560 100644 --- a/app/frontend/src/javascript/components/base/text-editor/iframe.tsx +++ b/app/frontend/src/javascript/components/base/text-editor/iframe.tsx @@ -3,7 +3,7 @@ import { Node } from '@tiptap/core'; export interface IframeOptions { allowFullscreen: boolean, HTMLAttributes: { - [key: string]: any + [key: string]: string }, }