object Object {} any unknown

object: In addition to the type of primitive (boolean null number string undefined bigint symbol) of

 

 

Object:

And like any Object, Object more stringent constraints

 

Object represents the original type of the object after packing, that is a method of primitives (describes funtionality that is common to all JS objects)

And any difference is:

let a:any

let b:Object

a.nomethod() // okay

b.nomethods() // error

 

{}:

Object {} and the same, according to information queries, {} Object inherited but did not add anything

 

 

unkown:

unknown type is only assignable to the any type and the unknown type itself

https://mariusschulz.com/blog/the-unknown-type-in-typescript

 

Guess you like

Origin www.cnblogs.com/eret9616/p/11311524.html