I want to delcare a Javascript object in typescript but i don't know what will be inside.
I currently use any
but my object can be of type null
, undefined
, boolean
, ...
I would like to be sure that my object is a Javascript object even if it is empty ( {}
)
Thanks to @VLAZ I have the awnser I was looking for: the type object
.
I had some trouble to find it in typescript doc because object is not a revelant keyword to search for.
Her is the doc about it: https://www.typescriptlang.org/docs/handbook/basic-types.html#object
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.