I got this error while using typescript.
Type 'string' is not assignable to type 'never'.
It works fine on javascript.
const [gifList, setGifList] = useState([])
const sendGif = async () => {
if (inputValue.length > 0) {
console.log('Gif link:', inputValue)
setGifList([...gifList, inputValue])
setInputValue('')
} else {
console.log('Empty input. Try again')
}
}
Could you please tell me how to properly declare a type in Typescript.