exaV / screeps-kotlin-types

Screep's Kotlin type definitions
MIT License
17 stars 18 forks source link

Implement workaround for the potentially undefined object #67

Closed magnusesp closed 4 years ago

magnusesp commented 4 years ago

InterShardMemory is simply undefined on private servers, so I've implemented a suggested workaround. Feedback most welcome!

exaV commented 4 years ago

Why not make intershardmemory on global nullable instead? Then people will have to do if (global.intershardmemory != null) themselves, but IMO that would be more in line with most examples found online