API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

T

typeValidatedChordBinding

@codexo/exojs / input / stable

A ChordAction binding, checked at compile time when it is a string LITERAL. A valid pattern types as itself, an invalid one as the message explaining why - so `new ChordAction('Ctrl+Sv')` fails to compile with `Argument of type '"Ctrl+Sv"' is not assignable to parameter of type '"ChordAction: unknown keyboard token \"Sv\" ..."'`. A plain `string` (a pattern read from a config file, built at runtime, or handed over from JavaScript) bails out and passes through untouched: only the parser above can judge it, and it still does. Array bindings pass through untouched as well, constrained by `ChordAction`'s own type parameter.

0
props
0
methods
0
events
Import
import { ValidatedChordBinding } from '@codexo/exojs'

A ChordAction binding, checked at compile time when it is a string LITERAL. A valid pattern types as itself, an invalid one as the message explaining why - so `new ChordAction('Ctrl+Sv')` fails to compile with `Argument of type '"Ctrl+Sv"' is not assignable to parameter of type '"ChordAction: unknown keyboard token \"Sv\" ..."'`.

A plain `string` (a pattern read from a config file, built at runtime, or handed over from JavaScript) bails out and passes through untouched: only the parser above can judge it, and it still does. Array bindings pass through untouched as well, constrained by `ChordAction`'s own type parameter.

Definition1
P extends string ? string extends P ? P : OrPatternError<P, ChordTextError<P>> : P
Source