Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

VSCode type inference broken

$
0
0

So in a mobx state tree view, I have this function

get hasIntro() {  const { rootStore, groupInfo } = self  // @ts-ignore  const { userStore } = rootStore // userStore is not yet initialized in root store  const { members } = groupInfo  const myMember = members?.find((m) => m.id === userStore.currentUser.id)  return !!myMember?.intro},

The linter tells me it returns any.enter image description here

How's this even possible?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>