Interfaces

Title

Description

Inserts 'root' route into the note

Describes an enhanced route

Describes a route note

Describes a processed routes

Describes a bunch of units

Describes not connected (unprocessed) unit

Describes a bunch of connectors

Describes a possible key value

Describes additional (optional) key prop

Describes route name options (root and wildcard)

Describes possible option args in creator functions

Generic Type:

<C = {}>

Keys

Type

Optional

root

RootNote (internal interface)

+

Declares a type which describes defaultroot route

Usage example:

export interface AboutNotes extends Root {
    person: Note;
}

// or if there is only one 'root' path

export type AboutNotes = Root;

Keys

Type

Optional

id

number

parentId

number

state

string[]

name

string

path

string

Generic Type:

<C = {}>

Keys

Type

Optional

path

string

name

string

+

children

+

Usage example:

export interface AppNotes {
    root: Note<ChildNotes>
    location: Note;
};

Generic Type:

<R = any, C = {}>

Keys

Type

Optional

key in keyof (R & C)

Usage example:

export const appUnit: Unit<AppNotes, AppChildNotes> = 
    createRoot<AppNotes, AppChildNotes>(routes);

Generic Type:

<R = any>

Keys

Type

Optional

key in keyof R

Unit<R[key]>

Usage example:

export interface Hub {
  app: AppNotes & AppChildNotes;
  about: AboutNotes;
}

export const hub: Units<Hub> = getRegisteredUnits<Hub>();

Generic Type:

<R = any, C = any>

Type:

(
  parentStructure: Structure,
  alternativeName?: string
) => Unit<R, C>;

Usage example:

export const aboutConnector: Connector<AboutNotes, AboutChildNotes> = 
    createFeature<AboutNotes, AboutChildNotes>(aboutRoutes);

Generic Type:

<R = any>

Keys

Type

Optional

key in keyof R

Connector<R[key]>

Usage example:

createRoot(appRoutes, { 
  /**
  * nearby prop accepts connectors
  */
  nearby: {
    location: locationConnector
  }
});

describes the private key value

Type:

string | symbol;

extends interfaces by private key property

Keys

Type

Optional

_key

privateNotesKey

provides an opportunity to change the default route names for some paths

Keys

Type

Optional

root

string

+

wildcard

string

+

Usage example:

createRoot(routes, {
    routeName: { 
        root: 'home',
        wildcard: 'notFound'
    } 
  }
);

describes possible options of root/feature creators

Keys

Type

Optional

key

routeName

nearby

Last updated