Code is:
const foo = (foo: string) => { const result = [] result.push(foo) }
I get the following TS error:
[t
The solution i found was
const [files, setFiles] = useState([] as any);