I have been trying to import some global variables from a mainScript to a script dedicated to a page. I have been trying to import it and it detects it but it says that the variables I’m trying to use don’t exist in that script
I have two scripts
masterPage.js:
export var preguntas = ["pregunta 1", "pregunta 2", "pregunta 3"];
export var randomNumber = 0;
export var respuestas = [];
the scripts of the page I’m working on
import * as masterScript from "file:///public/masterPage.js";
$w.onReady(function () {
$w("#Section1ListItem1Title1").text = masterScript.respuestas[0];
});
The error says:
Property ‘respuestas’ does not exist on type ‘typeof import(“file:///public/masterPage”)’.