Closed rtritto closed 3 months ago
With
const myAtom = atom<string>()
in VSCode I get
Expected 1 arguments, but got 0.ts(2554) atom.d.ts(38, 37): An argument for 'read' was not provided
Instead, as workaround with
const myAtom = atom<string | undefined>()
in ESLint I get
error Do not use useless `undefined` unicorn/no-useless-undefined
No Error in VSCode with
because Atom definition should already use undefined as default value
undefined
const [myState, setMyState] = useState<string>()
Actual
With
in VSCode I get
Instead, as workaround with
in ESLint I get
Expected
No Error in VSCode with
because Atom definition should already use
undefined
as default valueRelated example (React)