chore: import upstream snapshot with attribution
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
||||
// TypeScript declaration file for challenge-parser/parser
|
||||
// This module exports functions to parse challenge markdown files
|
||||
|
||||
type ChallengeFile = {
|
||||
name: string;
|
||||
contents: string;
|
||||
ext: string;
|
||||
editableRegionBoundaries: number[];
|
||||
};
|
||||
export interface ParsedChallenge {
|
||||
id: string;
|
||||
title: string;
|
||||
challengeType: number;
|
||||
description?: string;
|
||||
instructions?: string;
|
||||
questions?: string[];
|
||||
challengeFiles?: ChallengeFile[];
|
||||
solutions?: {
|
||||
contents: string;
|
||||
ext: string;
|
||||
name: string;
|
||||
}[][];
|
||||
[key: string]: unknown; // Allow for additional properties that may be added by plugins
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a markdown challenge file asynchronously
|
||||
* @param filename - Path to the markdown file to parse
|
||||
* @returns Promise that resolves to the parsed challenge data
|
||||
*/
|
||||
export function parseMD(filename: string): Promise<ParsedChallenge>;
|
||||
|
||||
/**
|
||||
* Parses a markdown challenge file synchronously
|
||||
* @param filename - Path to the markdown file to parse
|
||||
* @returns The parsed challenge data
|
||||
*/
|
||||
export function parseMDSync(filename: string): ParsedChallenge;
|
||||
Reference in New Issue
Block a user