Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @types/global

Index

Type aliases

Component

Component<A>: Component

Type parameters

  • A

ComponentClass

ComponentClass<Attrs, C>: { prototype: C }

Type parameters

Type declaration

  • prototype: C

DeepReadonly

DeepReadonly<T>: { readonly [ P in keyof T]: DeepReadonly<T[P]> }

Type parameters

  • T

DeepWritable

DeepWritable<T>: { -readonly [ P in keyof T]: DeepWritable<T[P]> }

Type parameters

  • T

ESModule

ESModule: { __esModule: true }

Type declaration

  • [key: string]: unknown
  • __esModule: true

KeyOfType

KeyOfType<Type, Match>: KeysOfType<Type, Match>[keyof Type]

Type that matches one of the keys of an object that is of the provided type, or a subtype of it.

Type parameters

  • Type: object

  • Match

KeysOfType

KeysOfType<Type, Match>: { [ Key in keyof Type]-?: Type[Key] extends Match ? Key : never }

Type that returns an array of all keys of a provided object that are of of the provided type, or a subtype of the type.

Type parameters

  • Type: object

  • Match

VnodeElementTag

VnodeElementTag<Attrs, C>: string | ComponentClass<Attrs, C>

Unfortunately, TypeScript only supports strings and classes for JSX tags. Therefore, our type definition should only allow for those two types.

see

https://github.com/microsoft/TypeScript/issues/14789#issuecomment-412247771

Type parameters

Writable

Writable<T>: { -readonly [ P in keyof T]: T[P] }

Type parameters

  • T

Variables

app

app: never
deprecated

Please import app from a namespace instead of using it as a global variable.

example

App in forum JS

import app from 'flarum/forum/app';
example

App in admin JS

import app from 'flarum/admin/app';
example

App in common JS

import app from 'flarum/common/app';

dayjs

dayjs: __module

flarum

flarum: FlarumObject

m

m: Static

Generated using TypeDoc version 0.22.10