diff --git a/ivette/src/frama-c/kernel/PivotTable.tsx b/ivette/src/frama-c/kernel/PivotTable.tsx index 6989025dc4cc8ac129a0d4e4d8e5055f08727f5c..28d3865a677283ca852d45949ea1313e97810195 100644 --- a/ivette/src/frama-c/kernel/PivotTable.tsx +++ b/ivette/src/frama-c/kernel/PivotTable.tsx @@ -40,7 +40,11 @@ import 'react-pivottable/pivottable.css'; // --- Pivot Table for Properties // -------------------------------------------------------------------------- -export function Pivot(props: any) { +interface PivotTableProps { + data: string[][]; +} + +export function Pivot(props: PivotTableProps) : JSX.Element { const [state, setState] = React.useState({}); return ( <PivotTableUI @@ -70,13 +74,13 @@ function PivotTableBuild () : JSX.Element { const rawData = States.useSyncValue(PivotState.pivotState); const [computing, setComputing] = React.useState(false); const [error, setError] = React.useState(''); - async function handleError (err: string) { + async function handleError (err: string) : Promise<void> { const msg = `The pivot table could not be built: an error has occured (${err}).`; setError(msg); Status.setMessage({ text: msg, kind: 'error' }); } - async function compute () { + async function compute () : Promise<void> { setComputing(true); setError(''); Server.send(PivotState.compute, [])