mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-19 18:18:27 -05:00
16 lines
369 B
TypeScript
16 lines
369 B
TypeScript
import {
|
|
ChallengeLang,
|
|
SuperBlocks,
|
|
superBlockToSpeechLang
|
|
} from '../../../shared-dist/config/curriculum.js';
|
|
|
|
export const getLangFromSuperBlock = (
|
|
superBlock: SuperBlocks
|
|
): ChallengeLang => {
|
|
const lang = superBlockToSpeechLang[superBlock];
|
|
if (!lang) {
|
|
throw new Error(`Missing lang mapping for superBlock: ${superBlock}`);
|
|
}
|
|
return lang;
|
|
};
|