mirror of
https://github.com/flarum/core.git
synced 2025-08-13 20:04:24 +02:00
Bundled output for commit bac0e594ee
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import type Mithril from 'mithril';
|
||||
import DefaultResolver from '../../common/resolvers/DefaultResolver';
|
||||
import DiscussionPage, { IDiscussionPageAttrs } from '../components/DiscussionPage';
|
||||
/**
|
||||
* A custom route resolver for DiscussionPage that generates the same key to all posts
|
||||
* on the same discussion. It triggers a scroll when going from one post to another
|
||||
* in the same discussion.
|
||||
*/
|
||||
export default class DiscussionPageResolver extends DefaultResolver {
|
||||
static scrollToPostNumber: string | null;
|
||||
export default class DiscussionPageResolver<Attrs extends IDiscussionPageAttrs = IDiscussionPageAttrs, RouteArgs extends Record<string, unknown> = {}> extends DefaultResolver<Attrs, DiscussionPage<Attrs>, RouteArgs> {
|
||||
static scrollToPostNumber: number | null;
|
||||
/**
|
||||
* Remove optional parts of a discussion's slug to keep the substring
|
||||
* that bijectively maps to a discussion object. By default this just
|
||||
@@ -18,6 +20,6 @@ export default class DiscussionPageResolver extends DefaultResolver {
|
||||
* @inheritdoc
|
||||
*/
|
||||
makeKey(): string;
|
||||
onmatch(args: any, requestedPath: any, route: any): any;
|
||||
render(vnode: any): any;
|
||||
onmatch(args: Attrs & RouteArgs, requestedPath: string, route: string): new () => DiscussionPage<Attrs>;
|
||||
render(vnode: Mithril.Vnode<Attrs, DiscussionPage<Attrs>>): Mithril.Children;
|
||||
}
|
||||
|
Reference in New Issue
Block a user