Following along with this great video on how to use types in typescript.
But I notice an inconsistency with my text editor's linting and the video.
The video shows like this
And mine shows like this
If I change the code, so it should not lint any errors, I still get the errors
What is going on here?
Don't know if this matter but I'm on typescript 3.3.x and the video is on 3.1.x
The video declared the array as follows:
const arr: myList = []
And you declared it like that:
const arr: myList[] = []
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.