Add typings for spectrum.js

Per #2258