Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 1005 Bytes

glossary.md

File metadata and controls

67 lines (51 loc) · 1005 Bytes

Naming Convention

Letter

Letter is an object that represent an character.

{
  original: string,
  typed: null | string,
  status: 'untyped' | 'correct' | 'incorrect' | 'extra',
}

LetterSequence

LetterSequence is array of Letter

Word

Word is an object that represent sequence of letters.

{
  isTyped: boolean,
  show: boolean,
  elRef: RefObject,
  originalWord: string,
  letterSequence: Array<Letter>,
}

WordSequence

WordSequence is array of Word

TypingStore

TypingStore is an object that represent state of user's typing in typing area.

{
  inputValue:string,
  languageJSON: {
    lang: string
    name: string
    words: Array<string>
  },
  wordSequence: WordSequence,
  caretPosition: [number, number],
  statistics: Object
}

Statistics

Statistics is result of a test in range of time.

{
  wpm: number,
  accuracy: number,
  correctWords: number,
  incorrectWords: number,
  time: number //in seconds
}