Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webstorm: what does "Element is not exported" warning mean?

if i write such code in webstorm

export class someOne {   constructor(param) {     this.test = param;   }    useTest(){     return this.test;   } }   console.log(new someOne(123).useTest()); 

and mouseover on "this.test" i see the warning: "Element is not exported"

element is not exported wtf

what does it mean? if i change the .test to .test1 the warning disappears

like image 588
ya_dimon Avatar asked Apr 16 '16 23:04

ya_dimon


1 Answers

For me it worked to mark all "private" properties with a prefixed underscore. Obviously Webstorm/IntelliJ recognized the properties as something that should not be exported.

export class someOne {   constructor(param) {     this._test = param;   }    useTest(){     return this._test;   } }   console.log(new someOne(123).useTest()); 
like image 123
Fabian Avatar answered Sep 17 '22 21:09

Fabian