Generate type spec.