ReferenceError: Text is not defined

Viewed 342

I use node.js in combination with typescript and I have a class with a method:

 createTextSinglelineTextNode(document: Document, infopageVariable: TextSingleline): Text {
     const text: Text = document.createTextNode(infopageVariable.content);
     console.log(text instanceof Text);
     return text;
 }

When I try to check whether the instance of the text is Text I get:

ReferenceError: Text is not defined

I have no clue what the problem could be. I thank you all in advance for your time and possible answers :)

0 Answers
Related