Fix TSLint issues

As this is the starter project it should be provided without any errors.
This commit restructures some code to solve the TSLint issues.
This commit is contained in:
Leo Friedrichs
2017-12-22 14:41:44 +01:00
parent af65405e38
commit 40c482bed8
2 changed files with 7 additions and 6 deletions

View File

@@ -2,11 +2,11 @@ import { ErrorMapper } from "utils/ErrorMapper";
// When compiling TS to JS and bundling with rollup, the line numbers and file names in error messages change
// This utility uses source maps to get the line numbers and file names of the original, TS source code
export const loop = ErrorMapper.wrapLoop(function() {
export const loop = ErrorMapper.wrapLoop(() => {
console.log(`Current game tick is ${Game.time}`);
// Automatically delete memory of missing creeps
for (let name in Memory.creeps) {
for (const name in Memory.creeps) {
if (!(name in Game.creeps)) {
delete Memory.creeps[name];
}