In my main.ts file, I am looking to define a variable that can be accessed in all Vue files.
Within my sfc.d.ts file, the following content is included:
declare module '*.vue' {
import Vue from 'vue'
export default Vue
}
declare var foo: any;
I have set a value for foo = "1234"
in main.ts.
What is the best way to access this variable foo
in all Vue files?
Alternatively, is there another method to create a global variable for universal use?