Module: constants

Application-wide constants for the Auto Suggestion Quiz app. Includes UI config, problem data, and AI suggestion sets.

Source:

Members

(static, constant) AI_SUGGESTIONS_BY_PROBLEM :Object.<number, Array.<Object>>

AI autocomplete suggestions indexed by problem ID. Each entry is an array of suggestion objects for the Monaco completion provider.

Type:
  • Object.<number, Array.<Object>>
Properties:
Name Type Description
suggestions[].label string

Display label for the suggestion.

suggestions[].detail string

Short detail string shown in the dropdown.

suggestions[].insertText string

Code snippet to insert.

Source:

(static, constant) DEFAULT_SUGGESTIONS :Array.<Object>

Fallback AI suggestions used when no problem-specific suggestions are defined.

Type:
  • Array.<Object>
Source:

(static, constant) DIFFICULTY_COLORS :Object.<string, string>

Maps difficulty levels to their display colors.

Type:
  • Object.<string, string>
Properties:
Name Type Description
Easy string

Green color for easy problems.

Medium string

Amber color for medium problems.

Hard string

Red color for hard problems.

Source:

(static, constant) LANGUAGE_MAP :Object.<string, string>

Maps app language keys to Monaco editor language identifiers.

Type:
  • Object.<string, string>
Source:

(static, constant) PROBLEMS :Array.<Object>

List of coding problems available in the app.

Type:
  • Array.<Object>
Properties:
Name Type Description
id number

Unique problem ID.

title string

Problem title.

difficulty string

'Easy', 'Medium', or 'Hard'.

tags Array.<string>

Topic tags.

status string

'not-started', 'in-progress', or 'completed'.

grade string | null

Grade percentage if completed, otherwise null.

description string

Full problem description.

examples Array.<Object>

Example input/output pairs.

starterCode Object

Starter code keyed by language.

Source:

(static, constant) STATUS_CONFIG :Object.<string, {label: string, color: string, icon: string}>

Display configuration for each problem status.

Type:
  • Object.<string, {label: string, color: string, icon: string}>
Source: