I have a main.ts file, I want to declare a variable over there and use it across all the Vue files.
I have a sfc.d.ts with this content:
declare module '*.vue' {
import Vue from 'vue'
export default Vue
}
declare var foo: any;
I assigned a value to foo = "1234" in main.ts.
How can I use this foo variable in all the Vue files?
Or is there any other way, to create global variable and use it across?
(window as any).foo = "1234";or(<any> window).foo = "1234";.