TypeWords Word Practice Modes: Complete List of 10 Study Methods Explained
TypeWords offers 10 distinct word practice modes defined by the WordPracticeMode enum, ranging from structured learning flows to free-form drills and tests.
The open-source vocabulary application zyronon/TypeWords implements its word practice modes through a centralized type system that ensures consistent behavior across the UI, routing layer, and practice engine. Every mode is enumerated, named, mapped to practice stages, and bound to specific URLs — all traceable in the codebase.
Complete List of TypeWords Practice Modes
The WordPracticeMode enum in app/core/types/enum.ts (lines 95-107) defines these numeric values:
| Mode | Value | Display Name | Purpose |
|---|---|---|---|
System |
0 | 学习 (Study) | Full-featured learning with spaced repetition |
Free |
1 | 自由练习 (Free Practice) | Open-ended practice without preset schedule |
IdentifyOnly |
2 | 自测 (Self-Test) | User identifies words without writing |
DictationOnly |
3 | 默写 (Dictation) | Write what you hear |
ListenOnly |
4 | 听写 (Listen & Write) | Listen and repeat back |
Shuffle |
5 | 随机复习 (Random Review) | Randomized review of learned vocabulary |
Review |
6 | 复习 (Review) | Structured spaced-repetition review |
ShuffleWordsTest |
7 | 随机单词测试 (Random Word Test) | Test mode with random word selection |
ReviewWordsTest |
8 | 单词测试 (Word Test) | Test mode focused on review words |
Custom |
9 | 自定义 (Custom) | User-defined or plugin practice flow |
Display names are resolved through WordPracticeModeNameMap in app/core/config/env.ts (lines 192-202).
How Practice Modes Drive the Application
Stage-to-Mode Mapping
The WordPracticeModeStageMap in app/core/config/env.ts declares which practice stages each mode executes. This determines the actual user experience:
// From app/core/config/env.ts
WordPracticeModeStageMap = {
[WordPracticeMode.System]: [FollowWriteNewWord, Complete],
[WordPracticeMode.Free]: [FollowWriteNewWord, Complete],
[WordPracticeMode.Shuffle]: [Shuffle, Complete],
[WordPracticeMode.Review]: [Review, Complete],
// ... additional mappings
}
Each array element represents a stage component rendered sequentially during practice.
URL Routing
The WordPracticeModeUrlMap (same file) routes modes to their appropriate views:
| Mode Category | Route |
|---|---|
| Standard modes (0-7) | /practice-words |
| Test modes (7-8) | /words-test |
Working with Practice Modes in Code
Change Mode Programmatically
import { useSettingStore } from '@/core/stores/setting'
import { WordPracticeMode } from '@/core/types/enum'
const settingStore = useSettingStore()
// Switch to dictation-focused practice
settingStore.wordPracticeMode = WordPracticeMode.DictationOnly
React to Mode Changes
import { computed } from 'vue'
import { useSettingStore } from '@/core/stores/setting'
import { WordPracticeMode } from '@/core/types/enum'
const settingStore = useSettingStore()
const isTestMode = computed(() =>
settingStore.wordPracticeMode === WordPracticeMode.ShuffleWordsTest ||
settingStore.wordPracticeMode === WordPracticeMode.ReviewWordsTest
)
Navigate to Mode-Specific Route
import { navigateTo } from '#app'
import { WordPracticeModeUrlMap } from '@/core/config/env'
import { WordPracticeMode } from '@/core/types/enum'
// Navigate to the URL bound to Shuffle mode
navigateTo(WordPracticeModeUrlMap[WordPracticeMode.Shuffle])
Key Source Files
| File | Responsibility |
|---|---|
app/core/types/enum.ts |
WordPracticeMode enum definition (lines 95-107) |
app/core/config/env.ts |
WordPracticeModeStageMap, WordPracticeModeNameMap, WordPracticeModeUrlMap |
app/core/stores/setting.ts |
wordPracticeMode persistent state field |
app/core/stores/practice.ts |
Consumes mode to build practice flow runtime |
Summary
- TypeWords provides 10 word practice modes organized in
WordPracticeModeenum with values 0-9 - Three architectural layers connect modes to the user: type definitions (
enum.ts), configuration mappings (env.ts), and persistent state (setting.ts) - Two route targets exist:
/practice-wordsfor standard learning and/words-testfor assessment modes - Stage arrays in
WordPracticeModeStageMapdefine the actual practice flow components each mode renders
Frequently Asked Questions
How do I implement a custom practice mode in TypeWords?
Extend WordPracticeMode.Custom (value 9) by providing your own stage array in WordPracticeModeStageMap and registering corresponding components. The existing architecture in app/core/config/env.ts supports plugin-style additions without modifying core enums.
What is the difference between Shuffle and Review modes?
Shuffle (mode 5) presents words in random order without spaced-repetition scheduling, ideal for casual review. Review (mode 6) follows structured intervals based on recall difficulty, as implemented in the practice engine's scheduling algorithm in app/core/stores/practice.ts.
Can I restrict users to DictationOnly mode?
Yes. Set settingStore.wordPracticeMode = WordPracticeMode.DictationOnly and optionally disable the mode selector UI. The practice engine will enforce this mode across sessions since the value persists in the setting store.
Which modes support testing without teaching?
ShuffleWordsTest (mode 7) and ReviewWordsTest (mode 8) route to /words-test and skip instructional stages. These modes run only [Test, Complete] stages per WordPracticeModeStageMap, eliminating FollowWriteNewWord or learning-oriented phases.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →