Add typing for spectrum