In CoffeeScript, you can prefix a parameter with @ (in this case type), to have it set as an instance variable.