On this page
Modules
Here you can find the various parts of the EFB API.
Classes
Enumerations
Interfaces
Type Aliases
ViewType
Ƭ ViewType: "page" | "popup"
UiView type. Can be set to page or popup
PublicUiViewEntry
Ƭ PublicUiViewEntry<Ref>: Pick(opens in a new tab)<UiViewEntry<Ref>, "key" | "ref">
Publicly consumable ViewEntry interface to disallow the visibility to be mutated from outside of AppViewService
Type parameters
| Name | Type |
|---|---|
Ref | UiViewRef |
Nullable
Ƭ Nullable<T>: null | T
Nullable Generic
Type parameters
| Name |
|---|
T |
RequiredProps
Ƭ RequiredProps<T, K>: T & Required(opens in a new tab)<Pick(opens in a new tab)<T, K>>
Mark properties as required
Type parameters
| Name | Type |
|---|---|
T | T |
K | extends keyof T = keyof T |
Valuable
Ƭ Valuable<T>: T extends unknown ? T | () => T : T
Mark as Valuable a type (ie: you can have elements that are string or a function returning a string)
Type parameters
| Name |
|---|
T |
Variables
Efb
• Const Efb: Container = Container.instance
EFB Instance
Functions
where
▸ where<T>(value): (input: T, currentVal?: boolean) => boolean
Generates a function which maps an input to a boolean where input is strictly equal to value.
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
value | T | Value you want to compare your input with |
Returns
fn
A function which maps an input to a boolean where input is strictly equal to value.
▸ (input, currentVal?): boolean
Parameters
| Name | Type |
|---|---|
input | T |
currentVal? | boolean |
Returns
boolean
toString
▸ toString<T>(): (input: T, currentVal?: string) => string
Generates a function which maps an input number to its string value.
Type parameters
| Name | Type |
|---|---|
T | extends number |
Returns
fn
A function which maps an input number to its string value.
▸ (input, currentVal?): string
Parameters
| Name | Type |
|---|---|
input | T |
currentVal? | string |
Returns
string
isFunction
▸ isFunction<T>(fn): fn is Function
Check if argument fn is a function.
Type parameters
| Name | Type | Description |
|---|---|---|
T | unknown | Expected type of fn. |
Parameters
| Name | Type |
|---|---|
fn | unknown |
Returns
fn is Function
value
▸ value<T>(arg): T
Get value by calling the arg if it is a function or by returning the arg.
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
arg | Valuable<T> |
Returns
T
offsetMousePosition
▸ offsetMousePosition(e, vec, element?): void
Sets the mouse position offsets recursively until reaching the element.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
e | MouseEvent(opens in a new tab) | undefined | The mouse event to process. |
vec | Float64Array(opens in a new tab) | undefined | The vector to assign to. |
element | null | HTMLElement(opens in a new tab) | null | The element to reach. |
Returns
void
elementOffset
▸ elementOffset(from, limit?): Float64Array(opens in a new tab)
Get offsets recursively until reaching the limit element or the top element.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
from | HTMLElement(opens in a new tab) | undefined | The element from starting. |
limit | Nullable<HTMLElement(opens in a new tab)> | null | The element to stop. |
Returns
Float64Array(opens in a new tab)
Coordinates from top-left offset.