Answer the question
In order to leave comments, you need to log in
Is it possible to assign a type to an empty object in typescript?
const x:{} = {};
As far as I know in typscript it is not possible to declare a type as an empty object, what happens if you do so. x:{}
In 2017 I got an error. I don't remember which typescript version I had. But now everything works. What is the reason? I have version^ 3.6.4
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question