, magicalclick wrote

@Ray7:

Have you watched the C9 video yet? Because that explained about everything. For example, the new constructor is mapped to the JS pattern that defines constructor. If you don't want to do that, you can use method for that. But you need to think about Type. Meaning, you can pass in a Object that has specific student attributes, but, you cannot say obj.SetSrudentAttrributes().

You don't need to rewrite the source, but, you need to give a type declaration xx.d.ts file. So TS would know know it is not ANY yet. If you pass in pure JS, the type is ANY, which I dont know how the IDE deal with it. Probably in the same video that I need to rewatch.

Yes, I think I have this rather set idea about dynamic languages: objects should just be THERE, sort of a thing. But of course, once you start adding types then all bets are off really.