Options
All
  • Public
  • Public/Protected
  • All
Menu

The Extollo Framework

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

AssociatedCollectionItem

AssociatedCollectionItem<T2, T>: { item: CollectionItem<T>; key: T2 }

Type parameters

  • T2

  • T

Type declaration

AssociatedSearchItem

AssociatedSearchItem: { item: any; key: any }

Type associating search items with a key.

Type declaration

  • item: any
  • key: any

AsyncPipeCondition

AsyncPipeCondition<T>: boolean | ((subject: T) => Awaitable<boolean>)

A condition or condition-resolving function for pipe methods.

Type parameters

  • T

AsyncPipeOperator

AsyncPipeOperator<T, T2>: (subject: T) => Awaitable<T2>

A closure that maps a given pipe item to a different type.

Type parameters

  • T

  • T2

Type declaration

AsyncPipeResolver

AsyncPipeResolver<T>: () => Awaitable<T>

A subject function that yields the value in the AsyncPipe.

Type parameters

  • T

Type declaration

AuthenticatableIdentifier

AuthenticatableIdentifier: string | number

Value that can be used to uniquely identify a user.

Awaitable

Awaitable<T>: T | Promise<T>

Type alias for something that may or may not be wrapped in a promise.

Type parameters

  • T

CanonicalResolver

Type parameters

  • T

CanonicalResolverFunction

CanonicalResolverFunction<T>: (key: string) => T | undefined

Type alias for a function that resolves a canonical name to a canonical item, if one exists.

Type parameters

  • T

Type declaration

    • (key: string): T | undefined
    • Parameters

      • key: string

      Returns T | undefined

ChunkCallback

ChunkCallback<T>: (items: Collection<T>) => any

Type parameters

  • T

Type declaration

CollectionComparable

CollectionComparable<T>: CollectionItem<T>[] | Collection<T>

Type parameters

  • T

CollectionFunction

CollectionFunction<T, T2>: (items: Collection<T>) => T2

Type parameters

  • T

  • T2

Type declaration

CollectionIndex

CollectionIndex: number

CollectionItem

CollectionItem<T>: T

Type parameters

  • T

ComparisonFunction

ComparisonFunction<T>: (item: CollectionItem<T>, otherItem: CollectionItem<T>) => number

Type parameters

  • T

Type declaration

ComplexSubscriber

ComplexSubscriber<T>: { complete?: SubscriberCompleteFunction<T>; error?: SubscriberErrorFunction; next?: SubscriberFunction<T> }

Subscribers that define multiple handler methods.

Type parameters

  • T

Type declaration

ComplexValidatorFunction

ComplexValidatorFunction: (fieldName: string, inputValue: any, params: ValidatorFunctionParams) => ValidationResult | Promise<ValidationResult>

A validator function that takes the field key, the object value, and an object of contextual params.

Type declaration

Constraint

Type alias for something that can be either a single constraint or a group of them.

ConstraintConnectionOperator

ConstraintConnectionOperator: "AND" | "OR" | "AND NOT" | "OR NOT"

SQL operator that is used to join two constraint clauses.

ConstraintGroupClosure

ConstraintGroupClosure<T>: (group: AbstractBuilder<T>) => any

Type alias for a function that applies some constraints to a builder group.

Type parameters

  • T

Type declaration

ConstraintOperator

ConstraintOperator: "&" | ">" | ">=" | "<" | "<=" | "!=" | "<=>" | "%" | "|" | "!" | "~" | "=" | "^" | "IN" | "NOT IN" | "LIKE" | "BETWEEN" | "NOT BETWEEN" | "IS" | "IS NOT"

SQL operator that appears in a constraint clause.

Constructor

Constructor<T>: new (...args: any[]) => T

Base type for a constructor function.

Type parameters

  • T

Type declaration

    • new (...args: any[]): T
    • Parameters

      • Rest ...args: any[]

      Returns T

ContainerResolutionCallback

ContainerResolutionCallback<T>: (() => unknown) | ((t: T) => unknown)

Simple type alias for a callback to a container's onResolve method.

Type parameters

  • T

DependencyKey

DependencyKey: Instantiable<any> | StaticClass<any, any> | string

Type used to represent a value that can identify a factory in the container.

DeterminesEquality

DeterminesEquality<T>: (item: CollectionItem<T>, other: any) => boolean

Type parameters

  • T

Type declaration

EscapeValue

EscapeValue: null | undefined | string | number | boolean | Date | QuerySafeValue | EscapeValue[]

A value which can be escaped to be interpolated into an SQL query.

EscapeValueObject

EscapeValueObject: {}

Object mapping string field names to EscapeValue items.

Type declaration

EventSubscriber

EventSubscriber<T>: (event: T) => Awaitable<void>

A closure that should be executed with the given event is fired.

Type parameters

Type declaration

GlobalRegistrant

GlobalRegistrant: { key: string | symbol; value: any }

Type structure for a single item in the global registry.

Type declaration

  • key: string | symbol
  • value: any

HTTPMethod

HTTPMethod: "post" | "get" | "patch" | "put" | "delete" | "unknown"

Enumeration of different HTTP verbs.

todo

add others?

JSONState

JSONState: {}

Type declaration

  • [key: string]: string | boolean | number | undefined | JSONState | (string | boolean | number | undefined | JSONState)[]

KeyFunction

KeyFunction<T, T2>: (item: CollectionItem<T>, index: number) => CollectionItem<T2>

Type parameters

  • T

  • T2

Type declaration

KeyOperator

KeyOperator<T, T2>: keyof T | KeyFunction<T, T2>

Type parameters

  • T

  • T2

KeyReducerFunction

KeyReducerFunction<T, T2>: (current: any, item: CollectionItem<T>, index: number) => T2

Type parameters

  • T

  • T2

Type declaration

KeyValue

KeyValue<T>: { key: string; value: T }

A key-value form of a given type.

Type parameters

  • T

Type declaration

  • key: string
  • value: T

LocaleHelper

LocaleHelper: (phrase: string, { plural, fallback, interp }: { fallback?: string; interp?: {}; plural?: number }) => string

Type name for the standalone localization helper function that can be passed around in lieu of the Locale service.

Type declaration

    • (phrase: string, { plural, fallback, interp }: { fallback?: string; interp?: {}; plural?: number }): string
    • Parameters

      • phrase: string
      • { plural, fallback, interp }: { fallback?: string; interp?: {}; plural?: number }
        • Optional fallback?: string
        • Optional interp?: {}
          • [key: string]: any
        • Optional plural?: number

      Returns string

Maybe

Maybe<T>: T | undefined

Type alias for something that may be undefined.

Type parameters

  • T

MaybeCollectionIndex

MaybeCollectionIndex: CollectionIndex | undefined

MaybeCollectionItem

MaybeCollectionItem<T>: CollectionItem<T> | undefined

Type parameters

  • T

MaybeDependency

MaybeDependency: any | undefined

MaybeFactory

MaybeFactory<T>: AbstractFactory<T> | undefined

Type parameters

  • T

MaybeHTTPCookie

MaybeHTTPCookie: HTTPCookie | undefined

Type alias for something that is either an HTTP cookie, or undefined.

MaybeIterationItem

MaybeIterationItem<T>: { done: boolean; value?: T }

Type parameters

  • T

Type declaration

  • done: boolean
  • Optional value?: T

ModelKey

ModelKey: string | number

A valid key on a model.

ModelKeys

Collection of keys of a set of models.

OptionDefinition

OptionDefinition: CLIOption<any> | string

Type alias for a definition of a command-line option.

This can be either an instance of CLIOption or a string describing an option.

example

Some examples of positional/flag options defined by strings: '{file name} | canonical name of the resource to create'

'--push -p {value} | the value to be pushed'

'--force -f | do a force push'

OrderDirection

OrderDirection: "ASC" | "DESC" | "asc" | "desc"

Possible SQL order-by clause directions.

OrderStatement

OrderStatement: { direction: OrderDirection; field: string }

Interface for storing the parts of a SQL order-by clause.

Type declaration

ParameterizedCallback

ParameterizedCallback<T>: (arg: T) => any

Type alias for a callback that accepts a typed argument.

Type parameters

  • T

Type declaration

    • (arg: T): any
    • Parameters

      • arg: T

      Returns any

PathLike

PathLike: string | UniversalPath

An item that could represent a path.

PipeCondition

PipeCondition<T>: boolean | ((subject: T) => boolean)

A condition or condition-resolving function for pipe methods.

Type parameters

  • T

PipeOperator

PipeOperator<T, T2>: (subject: T) => T2

Type parameters

  • T

  • T2

Type declaration

    • (subject: T): T2
    • Parameters

      • subject: T

      Returns T2

PromisePipeOperator

PromisePipeOperator<T, T2>: (subject: T, resolve: (val: T2) => unknown, reject: (err: Error) => unknown) => Awaitable<unknown>

Type parameters

  • T

  • T2

Type declaration

    • (subject: T, resolve: (val: T2) => unknown, reject: (err: Error) => unknown): Awaitable<unknown>
    • Parameters

      • subject: T
      • resolve: (val: T2) => unknown
          • (val: T2): unknown
          • Parameters

            • val: T2

            Returns unknown

      • reject: (err: Error) => unknown
          • (err: Error): unknown
          • Parameters

            • err: Error

            Returns unknown

      Returns Awaitable<unknown>

QueryRow

QueryRow: {}

A single query row, as an object.

Type declaration

  • [key: string]: any

QuerySource

QuerySource: string | { alias: string; table: string }

Type alias for an item that refers to a table in a database.

ReflexiveAsyncPipeOperator

ReflexiveAsyncPipeOperator<T>: (subject: T) => Awaitable<T | void>

A closure that maps a given pipe item to an item of the same type.

Type parameters

  • T

Type declaration

ReflexivePipeOperator

ReflexivePipeOperator<T>: (subject: T) => T

A closure that maps a given pipe item to an item of the same type.

Type parameters

  • T

Type declaration

    • (subject: T): T
    • Parameters

      • subject: T

      Returns T

RelationValue

RelationValue<T2>: Maybe<Collection<T2> | T2>

Type alias for possible values of a relation.

Type parameters

  • T2

ResolvedDependency

ResolvedDependency: { key: DependencyKey; paramIndex: number; resolved: any }

Type declaration

ResolvedRouteHandler

ResolvedRouteHandler: (request: Request) => ResponseObject

Type alias for a function that applies a route handler to the request. The goal is to transform RouteHandlers to ResolvedRouteHandler.

Type declaration

ResponseObject

ResponseObject: ResponseFactory | string | number | void | any | Promise<ResponseObject>

Type alias for an item that is a valid response object, or lack thereof.

RouteHandler

RouteHandler: ((request: Request, response: Response) => ResponseObject) | ((request: Request) => ResponseObject) | (() => ResponseObject) | string

Type alias for an item that defines a direct route handler.

ScopeClosure

ScopeClosure: (query: AbstractBuilder<any>) => Awaitable<void>

A closure that takes a query and applies some scope to it.

Type declaration

SessionData

SessionData: {}

Type alias describing some inflated session data.

Type declaration

  • [key: string]: any

ShouldQueue

ShouldQueue<T>: T & Queueable

Type annotation for a Queueable that should be pushed onto a queue.

Type parameters

  • T

SimpleValidatorFunction

SimpleValidatorFunction: (fieldName: string, inputValue: any) => ValidationResult | Promise<ValidationResult>

A validator function that takes only the field key and the object value.

Type declaration

SpecifiedField

SpecifiedField: string | QuerySafeValue | { alias: string; field: string | QuerySafeValue }

Type alias for an item that refers to a field on a table.

StaticClass

StaticClass<T, T2>: Function & { prototype: T } & T2

Type that identifies a value as a static class, even if it is not instantiable.

Type parameters

  • T

  • T2

StaticInstantiable

StaticInstantiable<T>: StaticClass<T, Instantiable<T>>

Type that identifies a value as a static class that instantiates to itself

Type parameters

  • T

SubscriberCompleteFunction

SubscriberCompleteFunction<T>: (val?: T) => any

Type of a basic subscriber function that handles completed events.

Type parameters

  • T

Type declaration

    • (val?: T): any
    • Parameters

      • Optional val: T

      Returns any

SubscriberErrorFunction

SubscriberErrorFunction: (error: Error) => any

Type of a basic subscriber function that handles errors.

Type declaration

    • (error: Error): any
    • Parameters

      • error: Error

      Returns any

SubscriberFunction

SubscriberFunction<T>: (val: T) => any

Type of a basic subscriber function.

Type parameters

  • T

Type declaration

    • (val: T): any
    • Parameters

      • val: T

      Returns any

Subscription

Subscription<T>: SubscriberFunction<T> | ComplexSubscriber<T>

Subscription to a behavior subject.

Type parameters

  • T

TypedDependencyKey

TypedDependencyKey<T>: Instantiable<T> | StaticClass<T, any> | string

A DependencyKey, but typed

Type parameters

  • T

Unsubscribe

Unsubscribe: { unsubscribe: () => void }

Object providing helpers for unsubscribing from a subscription.

Type declaration

  • unsubscribe: () => void
      • (): void
      • Returns void

Valid

Valid<T>: T

A type alias denoting that a particular type has been validated.

Type parameters

  • T

ValidationResult

All possible results of an attempted validation.

ValidationRules

ValidationRules: {}

A set of validation rules that are applied to input objects on validators.

The keys of this object are deep-nested keys and can be used to validate nested properties.

For example, the key "user.links.*.url" refers to the "url" property of all objects in the "links" array on the "user" object on:

{
    "user": {
        "links": [
            {
                "url": "..."
            },
            {
                "url": "..."
            }
        ]
    }
}

Type declaration

ValidatorFunction

Useful type alias for all allowed validator function signatures.

WhereOperator

WhereOperator: "&" | ">" | ">=" | "<" | "<=" | "!=" | "<=>" | "%" | "|" | "!" | "~" | "=" | "^"

Type representing a valid where operator.

WhereResult

WhereResult: any[]

Type representing the result of a where.

Variables

Const DEPENDENCY_KEYS_METADATA_KEY

DEPENDENCY_KEYS_METADATA_KEY: "extollo:di:dependencies:ctor" = 'extollo:di:dependencies:ctor'

Const DEPENDENCY_KEYS_PROPERTY_METADATA_KEY

DEPENDENCY_KEYS_PROPERTY_METADATA_KEY: "extollo:di:dependencies:properties" = 'extollo:di:dependencies:properties'

Const DEPENDENCY_KEYS_SERVICE_TYPE_KEY

DEPENDENCY_KEYS_SERVICE_TYPE_KEY: "extollo:di:service_type" = 'extollo:di:service_type'

Const EXTOLLO_AUTH_SESSION_KEY

EXTOLLO_AUTH_SESSION_KEY: "@extollo:auth.securityIdentifier" = '@extollo:auth.securityIdentifier'

Const EXTOLLO_ORM_MODEL_FIELDS_METADATA_KEY

EXTOLLO_ORM_MODEL_FIELDS_METADATA_KEY: "extollo:orm:Field.ts" = 'extollo:orm:Field.ts'

The reflection metadata key containing information about the model's fields.

Const HTTPMessage

HTTPMessage: { 100: string; 101: string; 102: string; 200: string; 201: string; 202: string; 203: string; 204: string; 205: string; 206: string; 207: string; 300: string; 301: string; 302: string; 303: string; 304: string; 305: string; 307: string; 308: string; 400: string; 401: string; 402: string; 403: string; 404: string; 405: string; 406: string; 407: string; 408: string; 409: string; 410: string; 411: string; 412: string; 413: string; 414: string; 415: string; 416: string; 417: string; 418: string; 419: string; 420: string; 422: string; 423: string; 424: string; 428: string; 429: string; 431: string; 500: string; 501: string; 502: string; 503: string; 504: string; 505: string; 507: string; 511: string } = ...

Maps HTTP status code to default status message.

Type declaration

  • 100: string
  • 101: string
  • 102: string
  • 200: string
  • 201: string
  • 202: string
  • 203: string
  • 204: string
  • 205: string
  • 206: string
  • 207: string
  • 300: string
  • 301: string
  • 302: string
  • 303: string
  • 304: string
  • 305: string
  • 307: string
  • 308: string
  • 400: string
  • 401: string
  • 402: string
  • 403: string
  • 404: string
  • 405: string
  • 406: string
  • 407: string
  • 408: string
  • 409: string
  • 410: string
  • 411: string
  • 412: string
  • 413: string
  • 414: string
  • 415: string
  • 416: string
  • 417: string
  • 418: string
  • 419: string
  • 420: string
  • 422: string
  • 423: string
  • 424: string
  • 428: string
  • 429: string
  • 431: string
  • 500: string
  • 501: string
  • 502: string
  • 503: string
  • 504: string
  • 505: string
  • 507: string
  • 511: string

Const ModelEvents

ModelEvents: { ModelCreatedEvent: typeof ModelCreatedEvent; ModelCreatingEvent: typeof ModelCreatingEvent; ModelDeletedEvent: typeof ModelDeletedEvent; ModelDeletingEvent: typeof ModelDeletingEvent; ModelEvent: typeof ModelEvent; ModelRetrievedEvent: typeof ModelRetrievedEvent; ModelSavedEvent: typeof ModelSavedEvent; ModelUpdatedEvent: typeof ModelUpdatedEvent; ModelUpdatingEvent: typeof ModelUpdatingEvent } = ...

Type declaration

  • ModelCreatedEvent: typeof ModelCreatedEvent
  • ModelCreatingEvent: typeof ModelCreatingEvent
  • ModelDeletedEvent: typeof ModelDeletedEvent
  • ModelDeletingEvent: typeof ModelDeletingEvent
  • ModelEvent: typeof ModelEvent
  • ModelRetrievedEvent: typeof ModelRetrievedEvent
  • ModelSavedEvent: typeof ModelSavedEvent
  • ModelUpdatedEvent: typeof ModelUpdatedEvent
  • ModelUpdatingEvent: typeof ModelUpdatingEvent

Const globalRegistry

globalRegistry: GlobalRegistry = ...

Export a singleton global registry for all code to share.

Exporting an instance here guarantees that all code that import it will get the same instance.

Functions

Const CLIDirective

  • CLIDirective(): ClassDecorator
  • Register a class as a command-line Directive. The class must extend Directive.

    Returns ClassDecorator

Const FactoryProducer

  • FactoryProducer(): ClassDecorator

Field

  • Field(type: FieldType, databaseKey?: string): PropertyDecorator
  • Decorator that maps the given property to a database column of the specified FieldType.

    example
    class MyModel extends Model<MyModel> {
        // Maps the 'name' VARCHAR column in the database to this property
        @Field(FieldType.Varchar)
        public name!: string
    
        // Maps the 'first_name' VARCHAR column in the database to this property
        @Field(FieldType.Varchar, 'first_name')
        public firstName!: string
    }
    

    Parameters

    • type: FieldType
    • Optional databaseKey: string

    Returns PropertyDecorator

Const Inject

  • Inject(key?: any, __namedParameters?: { debug: any }): PropertyDecorator
  • Mark the given class property to be injected by the container. If a key is specified, that DependencyKey will be injected. Otherwise, the DependencyKey is inferred from the type annotation.

    Parameters

    • Optional key: any
    • __namedParameters: { debug: any } = {}

    Returns PropertyDecorator

Const InjectParam

  • InjectParam(key: any): ParameterDecorator
  • Parameter decorator to manually mark a parameter as being an injection target on injectable classes. This can be used to override the dependency key of a given parameter.

    Parameters

    • key: any

    Returns ParameterDecorator

Const Injectable

  • Injectable(): ClassDecorator
  • Class decorator that marks a class as injectable. When this is applied, dependency metadata for the constructors params is resolved and stored in metadata.

    Returns ClassDecorator

Related

  • Related(): MethodDecorator
  • Decorator for relation methods on a Model implementation. Caches the relation instances between uses for the life of the model.

    Returns MethodDecorator

Const Singleton

  • Singleton(name?: string): ClassDecorator
  • Class decorator that registers the class as a singleton instance in the global container.

    Parameters

    • Optional name: string

    Returns ClassDecorator

appPath

applyMixins

  • applyMixins(derivedCtor: FunctionConstructor, baseCtors: any[]): void
  • Apply the given mixin classes to the given constructor.

    Parameters

    • derivedCtor: FunctionConstructor
    • baseCtors: any[]

    Returns void

Const applyWhere

basePath

bytesToHumanFileSize

  • bytesToHumanFileSize(bytes: number, si?: boolean, dp?: number): string

Const collect

dataGetUnsafe

  • dataGetUnsafe<T>(data: {} | any[] | undefined, path: string, defaultValue?: T): T | T[] | undefined
  • Get a deep-nested property on the given data object. This is NOT typesafe and is meant for internal use only.

    Type parameters

    • T

    Parameters

    • data: {} | any[] | undefined
    • path: string
    • Optional defaultValue: T

    Returns T | T[] | undefined

dataSetUnsafe

  • dataSetUnsafe(path: string, value: unknown, data: {} | any[] | undefined): any
  • Set a deep-nested property on the given object. This is NOT typesafe and is meant for internal use only.

    Parameters

    • path: string
    • value: unknown
    • data: {} | any[] | undefined

    Returns any

dataWalkUnsafe

  • dataWalkUnsafe<T>(data: {} | any[] | undefined, path: string, defaultValue?: T, currentPath?: string): IterableIterator<[T | T[] | undefined, string]>
  • Walks the given data object down to the given path, yielding subkeys. This is NOT typesafe and is intended for framework use only.

    Type parameters

    • T

    Parameters

    • data: {} | any[] | undefined
    • path: string
    • Optional defaultValue: T
    • currentPath: string = ''

    Returns IterableIterator<[T | T[] | undefined, string]>

deepCopy

  • deepCopy<T>(target: T): T

dehydrate

env

  • env(key: string, defaultValue?: unknown): any
  • Helper function that resolves and infers environment variable values.

    If none is found, returns defaultValue.

    Parameters

    • key: string
    • Optional defaultValue: unknown

    Returns any

error

Const fetch

  • fetch(url: RequestInfo, init?: RequestInit): Promise<Response>
  • Parameters

    • url: RequestInfo
    • Optional init: RequestInit

    Returns Promise<Response>

file

formRequest

  • Builds a middleware function that validates a request's input against the given form request class and registers the FormRequest class into the request container.

    example
    Route.group(...).pre(formRequest(MyFormRequestClass))
    

    Type parameters

    • T

    Parameters

    Returns RouteHandler

getFieldsMeta

hasOwnProperty

  • hasOwnProperty<X, Y>(obj: X, prop: Y): obj is X & Record<Y, unknown>
  • A typescript-compatible version of Object.hasOwnProperty.

    Type parameters

    • X: {}

    • Y: PropertyKey

    Parameters

    • obj: X
    • prop: Y

    Returns obj is X & Record<Y, unknown>

html

http

ifDebugging

  • ifDebugging(key: string, run: () => any): void

infer

  • infer(val: string): undefined | boolean | number | JSONState | string | null
  • Given a string of a value, try to infer the JavaScript type.

    Parameters

    • val: string

    Returns undefined | boolean | number | JSONState | string | null

inverseFieldType

  • Given a FieldType, get the inverse (that is, the code-form name).

    example
    console.log(FieldType.varchar)  // => "character varying"
    console.log(inverseFieldType(FieldType.varchar))  // => "varchar"
    console.log(inverseFieldType('character varying'))  // => "varchar"
    

    Parameters

    Returns string

isAuthenticationConfig

isBindable

  • isBindable(what: unknown): what is Bindable

isCanonicalReceiver

isConstraintGroup

isConstraintItem

isDebugging

  • isDebugging(key: string): boolean

isHTTPMethod

isInstantiable

  • Returns true if the given value is instantiable.

    Type parameters

    • T

    Parameters

    • what: unknown

    Returns what is Instantiable<T>

isInstantiableOf

  • Returns true if the given value is instantiable and, once instantiated, will create an instance of the given static class.

    Type parameters

    • T

    Parameters

    Returns what is Instantiable<T>

isJSON

  • isJSON(val: string): boolean

isJSONState

  • isJSONState(what: unknown): what is JSONState

isKeyof

  • isKeyof<T>(key: unknown, obj: T): key is keyof T
  • Simple helper method to verify that a key is a keyof some object.

    Type parameters

    • T

    Parameters

    • key: unknown
    • obj: T

    Returns key is keyof T

Const isLogMessage

  • isLogMessage(something: unknown): something is LogMessage

Const isLoggingLevel

  • isLoggingLevel(something: unknown): something is LoggingLevel

isQueueable

  • isQueueable(something: unknown): something is Queueable
  • Truth function that returns true if an object implements the same interface as Queueable. This is done in case some external library needs to be incorporated as the base class for a Queueable, and cannot be made to extend Queueable.

    Parameters

    • something: unknown

    Returns something is Queueable

isStaticClass

  • isStaticClass<T, T2>(something: unknown): something is StaticClass<T, T2>
  • Returns true if the parameter is a static class.

    Type parameters

    • T

    • T2

    Parameters

    • something: unknown

    Returns something is StaticClass<T, T2>

json

lib

logIfDebugging

  • logIfDebugging(key: string, ...output: any[]): void

objectToKeyValue

  • objectToKeyValue<T>(obj: {}): KeyValue<T>[]
  • Create an array of key-value pairs for the keys in a uniform object.

    Type parameters

    • T

    Parameters

    • obj: {}
      • [key: string]: T

    Returns KeyValue<T>[]

padCenter

  • padCenter(string: string, length: number, padWith?: string): string
  • If string is less than length characters long, add however many padWith characters are necessary to make up the difference evenly split between the beginning and end of the string.

    Parameters

    • string: string
    • length: number
    • padWith: string = ' '

    Returns string

padLeft

  • padLeft(string: string, length: number, padWith?: string): string
  • If string is less than length characters long, add however many padWith characters are necessary to make up the difference to the BEGINNING of the string.

    Parameters

    • string: string
    • length: number
    • padWith: string = ' '

    Returns string

padRight

  • padRight(string: string, length: number, padWith?: string): string
  • If string is less than length characters long, add however many padWith characters are necessary to make up the difference to the END of the string.

    Parameters

    • string: string
    • length: number
    • padWith: string = ' '

    Returns string

plaintext

raw

redirect

redirectToGet

route

setFieldsMeta

shouldQueue

  • shouldQueue<T>(something: T): something is ShouldQueue<T>
  • Truth function that returns true if the given object is Queueable and wants to be pushed onto the queue.

    Type parameters

    • T

    Parameters

    • something: T

    Returns something is ShouldQueue<T>

staticServer

stringToPascal

  • stringToPascal(input: string): string

temporary

Const toString

  • toString(item: unknown): string

uninfer

  • uninfer(val: unknown): string
  • Given an inferred value, try to convert back to the string form.

    Parameters

    • val: unknown

    Returns string

universalPath

uuid4

  • uuid4(): string

view

walk

  • walk(dir: string): any
  • Walk recursively over entries in a directory.

    Right now the types are kinda weird for async iterables. This is like an async IterableIterable that resolves a string or another IterableIterable of the same type.

    Hence why it's separate from the UniversalPath class.

    Parameters

    • dir: string

    Returns any

Const whereMatch

withTimeout

Extollo Logo

extollo (v. latin) - to lift up, to elevate

Extollo is a free & libre application framework in TypeScript.