Skip to content

Utility

This module contains some helpful types and factories.

Table of contents

Interfaces

Type Aliases

Type Aliases

FComponentFactory

Ƭ FComponentFactory: Object

Type declaration

NameType
Full<PProps, SState>(Props: PProps, RenderFunction: TComponentRenderFunction<SState>, UseStateFunction: (Props: PProps) => TStateUnstyled<SState>, UseStylesFunction: (StateUnstyled: TStateUnstyled<SState>) => SState, DisplayName?: string) => ReactElement
NoProps{ Full: <SState>(RenderFunction: TComponentRenderFunction<SState>, UseStateFunction: () => TStateUnstyled<SState>, UseStylesFunction: (StateUnstyled: TStateUnstyled<SState>) => SState, DisplayName?: string) => ReactElement ; Stateless: (RenderFunction: TComponentRenderFunction<FStyledState>, UseStylesFunction: () => FStyledState, DisplayName?: string) => ReactElement ; Unstyled: <SState>(RenderFunction: TComponentRenderFunction<SState>, UseStateFunction: () => SState, DisplayName?: string) => ReactElement }
NoProps.Full<SState>(RenderFunction: TComponentRenderFunction<SState>, UseStateFunction: () => TStateUnstyled<SState>, UseStylesFunction: (StateUnstyled: TStateUnstyled<SState>) => SState, DisplayName?: string) => ReactElement
NoProps.Stateless(RenderFunction: TComponentRenderFunction<FStyledState>, UseStylesFunction: () => FStyledState, DisplayName?: string) => ReactElement
NoProps.Unstyled<SState>(RenderFunction: TComponentRenderFunction<SState>, UseStateFunction: () => SState, DisplayName?: string) => ReactElement
Stateless<PProps>(Props: PProps, RenderFunction: TComponentRenderFunction<TStyledProps<PProps>>, UseStylesFunction: (Props: PProps) => TStyledProps<PProps>, DisplayName?: string) => ReactElement
Unstyled<PProps, SState>(Props: PProps, RenderFunction: TComponentRenderFunction<SState>, UseStateFunction: (Props: PProps) => SState, DisplayName?: string) => ReactElement

Defined in

Utility/Utility.Types.ts:83


FRootStyles

Ƭ FRootStyles: () => { Root: string }

Type declaration

▸ (): Object

Returns

Object

NameType
Rootstring

Defined in

Utility/Utility.Types.ts:12


FStylable

Ƭ FStylable: Object

Type declaration

NameType
style?CSSProperties

Defined in

Utility/Utility.Types.ts:20


PParentComponent

Ƭ PParentComponent: FStyledState & { children?: ReactNode }

Defined in

Utility/Utility.Types.ts:36


TComplement

Ƭ TComplement<T, U>: { [K in Exclude<keyof T, keyof U>]: T[K] }

Type parameters

NameType
Textends U
UU

Defined in

Utility/Utility.Types.ts:41


TComponentRenderFunction

Ƭ TComponentRenderFunction<SState>: Object

Type parameters

Name
SState

Call signature

▸ (State): ReactElement<any, string | JSXElementConstructor<any>>

Parameters
NameType
StateSState
Returns

ReactElement<any, string | JSXElementConstructor<any>>

Type declaration

NameType
displayName?string

Defined in

Utility/Utility.Types.ts:77


TDefault

Ƭ TDefault<T, TKeys>: { [Key in TKeys]-?: undefined extends T[Key] ? T[Key] : never }

Contains the optional properties of T, but they are now required.

Type parameters

NameType
TT
TKeysextends keyof T = keyof T

Defined in

Utility/Utility.Types.ts:47


TPartialSubset

Ƭ TPartialSubset<T, U>: Omit<T, keyof U> & Partial<Pick<T, keyof U>>

Type parameters

NameType
Textends U
UU

Defined in

Utility/Utility.Types.ts:59


TPartialSubsetFromKeys

Ƭ TPartialSubsetFromKeys<T, TKeys>: Omit<T, TKeys> & Partial<Pick<T, TKeys>>

Make specific properties partial.

Type parameters

NameType
TT
TKeysextends keyof T

Defined in

Utility/Utility.Types.ts:55


TRef

Ƭ TRef<T>: Object

Type parameters

Name
T

Type declaration

NameType
RefT

Defined in

Utility/Utility.Types.ts:25


TStateUnstyled

Ƭ TStateUnstyled<SState>: SState extends FStyledState ? TPartialSubset<SState, FStyledState> : SState

Sometimes the Props are the State, so we do not have a separate type. Thus, we use a conditional type here in case the template parameter does not contain (new) styles.

Type parameters

Name
SState

Defined in

Utility/Utility.Types.ts:69


TStyledProps

Ƭ TStyledProps<PProps>: PProps & FStyledState

A type of state that is the Props, equipped with styling.

Type parameters

Name
PProps

Defined in

Utility/Utility.Types.ts:75


TStyles

Ƭ TStyles<T>: () => { [Index in T]: string }

The return value of makeStyles for T union of class names.

Type parameters

NameType
Textends string

Type declaration

▸ (): { [Index in T]: string }

Returns

{ [Index in T]: string }

Defined in

Utility/Utility.Types.ts:18