
[ad_1]
Hello i’m making an attempt to make a local construct for Mac OS. When i do that the editor logs a whole lot of errors:
I do know it occurs provided that i’ve a reference to sys.localStorage
in any class which is exported as const.
When i take away sys.localStorage
from my code the editor makes a construct with out errors.
So right here an instance:
MainEnums.ts has just one line:export const check = new Test()
Test.ts:
import {sys} from 'cc'
export class Test {
constructor() {
sys.localStorage.removeItem('check')
const merchandise = sys.localStorage.getItem('check')
sys.localStorage.setItem('check', "null")
}
}
[ad_2]