Is it possible to declare a global array in Typescript so that it can be accessed using "this" from any part of the code? In javascript, I would typically declare it as "var anArray=[]
". What is the equivalent way of doing this in Typescript?
Using anArray:Array<any>
doesn't seem to work. Can you provide some guidance on the correct method?