mirror of
https://github.com/flarum/framework.git
synced 2025-03-15 00:05:12 +08:00
Bundled output for commit 29c290e78f68b878b7d8a82c4bd5f0fe7abf3f81
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
parent
29c290e78f
commit
2b87f10738
5
js/dist-typings/admin/routes.d.ts
vendored
5
js/dist-typings/admin/routes.d.ts
vendored
@ -1,6 +1,5 @@
|
||||
import AdminApplication from './AdminApplication';
|
||||
/**
|
||||
* The `routes` initializer defines the forum app's routes.
|
||||
*
|
||||
* @param {App} app
|
||||
*/
|
||||
export default function _default(app: any): void;
|
||||
export default function (app: AdminApplication): void;
|
||||
|
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
|
||||
|
2
js/dist-typings/forum/ForumApplication.d.ts
vendored
2
js/dist-typings/forum/ForumApplication.d.ts
vendored
@ -1,5 +1,6 @@
|
||||
import History from './utils/History';
|
||||
import Pane from './utils/Pane';
|
||||
import { makeRouteHelpers } from './routes';
|
||||
import Application from '../common/Application';
|
||||
import NotificationListState from './states/NotificationListState';
|
||||
import GlobalSearchState from './states/GlobalSearchState';
|
||||
@ -44,6 +45,7 @@ export default class ForumApplication extends Application {
|
||||
* is used in the index page and the slideout pane.
|
||||
*/
|
||||
discussions: DiscussionListState;
|
||||
route: typeof Application.prototype.route & ReturnType<typeof makeRouteHelpers>;
|
||||
constructor();
|
||||
/**
|
||||
* @inheritdoc
|
||||
|
22
js/dist-typings/forum/routes.d.ts
vendored
22
js/dist-typings/forum/routes.d.ts
vendored
@ -1,6 +1,22 @@
|
||||
import ForumApplication from './ForumApplication';
|
||||
import Discussion from '../common/models/Discussion';
|
||||
import Post from '../common/models/Post';
|
||||
import User from '../common/models/User';
|
||||
/**
|
||||
* The `routes` initializer defines the forum app's routes.
|
||||
*
|
||||
* @param {App} app
|
||||
*/
|
||||
export default function _default(app: any): void;
|
||||
export default function (app: ForumApplication): void;
|
||||
export declare function makeRouteHelpers(app: ForumApplication): {
|
||||
/**
|
||||
* Generate a URL to a discussion.
|
||||
*/
|
||||
discussion: (discussion: Discussion, near: number) => string;
|
||||
/**
|
||||
* Generate a URL to a post.
|
||||
*/
|
||||
post: (post: Post) => string;
|
||||
/**
|
||||
* Generate a URL to a user.
|
||||
*/
|
||||
user: (user: User) => string;
|
||||
};
|
||||
|
2
js/dist/admin.js.map
generated
vendored
2
js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/forum.js
generated
vendored
2
js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/forum.js.map
generated
vendored
2
js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user