Really minor but you can use `goog.functions.constant` here:
```
ol.renderer.canvas.Map.prototype.getType = goog.functions.constant('canvas');
```