mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-21 11:04:47 -05:00
41 lines
744 B
TypeScript
41 lines
744 B
TypeScript
export interface ChallengeFile {
|
|
contents: string;
|
|
ext: string;
|
|
name: string;
|
|
}
|
|
|
|
export interface Challenge {
|
|
id: string;
|
|
title: string;
|
|
challengeFiles?: ChallengeFile[];
|
|
[key: string]: unknown;
|
|
}
|
|
|
|
export interface CommentDictionary {
|
|
[comment: string]: {
|
|
[lang: string]: string;
|
|
};
|
|
}
|
|
|
|
export function translateComments(
|
|
text: string,
|
|
lang: string,
|
|
dict: CommentDictionary,
|
|
codeLang: string
|
|
): { text: string };
|
|
|
|
export function translateCommentsInChallenge(
|
|
challenge: Challenge,
|
|
lang: string,
|
|
dict: CommentDictionary
|
|
): Challenge;
|
|
|
|
export function translateGeneric(
|
|
input: { text: string },
|
|
config: {
|
|
knownComments: string[];
|
|
dict: CommentDictionary;
|
|
lang: string;
|
|
}
|
|
): { text: string };
|