mirror of
https://github.com/flarum/core.git
synced 2025-08-08 17:36:38 +02:00
Bundled output for commit 29c290e78f
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
13
js/dist-typings/common/Application.d.ts
vendored
13
js/dist-typings/common/Application.d.ts
vendored
@@ -13,10 +13,7 @@ import type Mithril from 'mithril';
|
||||
import type Component from './Component';
|
||||
import type { ComponentAttrs } from './Component';
|
||||
export declare type FlarumScreens = 'phone' | 'tablet' | 'desktop' | 'desktop-hd';
|
||||
export declare type FlarumGenericRoute = RouteItem<Record<string, unknown>, Component<{
|
||||
routeName: string;
|
||||
[key: string]: unknown;
|
||||
}>, Record<string, unknown>>;
|
||||
export declare type FlarumGenericRoute = RouteItem<any, any, any>;
|
||||
export interface FlarumRequestOptions<ResponseType> extends Omit<Mithril.RequestOptions<ResponseType>, 'extract'> {
|
||||
errorHandler?: (error: RequestError) => void;
|
||||
url: string;
|
||||
@@ -52,18 +49,14 @@ export declare type RouteItem<Attrs extends ComponentAttrs, Comp extends Compone
|
||||
/**
|
||||
* The component to render when this route matches.
|
||||
*/
|
||||
component: {
|
||||
new (): Comp;
|
||||
};
|
||||
component: new () => Comp;
|
||||
/**
|
||||
* A custom resolver class.
|
||||
*
|
||||
* This should be the class itself, and **not** an instance of the
|
||||
* class.
|
||||
*/
|
||||
resolverClass?: {
|
||||
new (): DefaultResolver<Attrs, Comp, RouteArgs>;
|
||||
};
|
||||
resolverClass?: new (component: new () => Comp, routeName: string) => DefaultResolver<Attrs, Comp, RouteArgs>;
|
||||
} | {
|
||||
/**
|
||||
* An instance of a route resolver.
|
||||
|
@@ -11,13 +11,9 @@ import type { default as Component, ComponentAttrs } from '../Component';
|
||||
export default class DefaultResolver<Attrs extends ComponentAttrs, Comp extends Component<Attrs & {
|
||||
routeName: string;
|
||||
}>, RouteArgs extends Record<string, unknown> = {}> implements RouteResolver<Attrs, Comp, RouteArgs> {
|
||||
component: {
|
||||
new (): Comp;
|
||||
};
|
||||
component: new () => Comp;
|
||||
routeName: string;
|
||||
constructor(component: {
|
||||
new (): Comp;
|
||||
}, routeName: string);
|
||||
constructor(component: new () => Comp, routeName: string);
|
||||
/**
|
||||
* When a route change results in a changed key, a full page
|
||||
* rerender occurs. This method can be overriden in subclasses
|
||||
|
Reference in New Issue
Block a user