Closed Nokel81 closed 1 week ago
could you add a codesandbox or similar to demonstrate the issue, against the latest typescript version? Note that we don't maintain compatibility with older TS versions, so you might need to upgrade first to 5.6.3. to see if the problem persists.
Oh okay that is probably the problem then since I see you are now using the MapIterator
type which was introduced in 5.6
Intended outcome:
The following code should pass type check:
Actual outcome:
The line
const getFirstValue = (): string => Array.from(map.values())[0];
has the following type errorType 'unknown' is not assignable to type 'string'. ts(2322)
Versions
mobx: 6.13.5 typescript: 4.9.5