Interface NamingConvention<A, R>

Naming convention, which interprets a name component in a specific way.

interface NamingConvention<A, R = A> {
    create: (v: A) => Component;
    match: (comp: Component) => boolean;
    parse: (comp: Component) => R;
}

Type Parameters

  • A

    Input type to construct component.

  • R = A

    Output type to interpret component.

Properties

Properties

create: (v: A) => Component

Create a component from input value following this naming convention.

match: (comp: Component) => boolean

Determine if a component follows this naming convention.

parse: (comp: Component) => R

Parse value of a matched component.