Is it possible to use the exported variable in class in the same file its exported?
JavaScript
x
9
1
exports.var = "something";
2
3
class c {
4
constructor() {
5
this.var = var;
6
}
7
}
8
export.class = class;
9
Advertisement
Answer
Yes. this.var = exports.var;
answer by Patrick Hund