How to find out at runtime if a variable of type any implements an interface?
if(a instanceof A) alert(a.member);
If you enter this code in the typescript playground, the last line will be marked as an error, "The name A does not exist in the current scope". I even tried changing the variable declaration but even that did not work out well. I could not find anything useful on the web and so I am posting this question.
The typescript playground's autocompletion reveals that typescript even offers a method implements. How can I use it ?