There doesn't seem to be a way to make @global AS variables visible to TypeScript. For example, this doesn't work:
// AS uses `@global`
@global
const foo: i32 = 123
// Try to make it visible in VS Code intellisense
declare global {
const foo: i32
}
playground