spacing nit: `function(){ typeIndex.push(index); }`