After attempting to cast an interface, the entire code turns white.
let object : someInterface = <someInterface> someUnknownHapiRequestPayload
View a screenshot of the text editor here
I have already tried common troubleshooting steps such as updating VS22, restoring defaults, changing text editor and theme settings, recreating the project, among other basic solutions.
If anyone knows how I can cast unknown type data (validated against my interface schema) to assert its type and instantiate a new object in a way that allows me to access its properties like:
object.someInterfacePropertie = someFunction(object.someInterfacePropertie)
Any help on this issue would be greatly appreciated. As a newcomer to TypeScript, I thank you in advance.
EDIT:
I found a workaround by casting my interface differently:
let object: someInterface = someUnknownHapiRequestPayload as someInterface
This method resolved the issue with the text editor. However, I still consider the original approach a valid one, and will be reporting this as a problem to Microsoft.