1
0
mirror of https://github.com/flarum/core.git synced 2025-09-06 14:10:49 +02:00

Bundled output for commit 47b670aa29

Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
This commit is contained in:
flarum-bot
2023-02-08 20:19:47 +00:00
parent 47b670aa29
commit 08dead81ce
35 changed files with 69 additions and 29 deletions

View File

@@ -35,8 +35,10 @@ import AdminApplication from './AdminApplication';
import generateElementId from './utils/generateElementId';
declare const _default: {
extenders: {
Model: typeof import("../common/extenders/Model").default;
PostTypes: typeof import("../common/extenders/PostTypes").default;
Routes: typeof import("../common/extenders/Routes").default;
Store: typeof import("../common/extenders/Store").default;
};
extend: typeof import("../common/extend");
Session: typeof import("../common/Session").default;

View File

@@ -69,8 +69,12 @@ export default class Store {
* The model registry. A map of resource types to the model class that
* should be used to represent resources of that type.
*/
models: Record<string, typeof Model>;
constructor(models: Record<string, typeof Model>);
models: Record<string, {
new (): Model;
}>;
constructor(models: Record<string, {
new (): Model;
}>);
/**
* Push resources contained within an API payload into the store.
*

View File

@@ -87,8 +87,10 @@ import ModalManagerState from './states/ModalManagerState';
import PageState from './states/PageState';
declare const _default: {
extenders: {
Model: typeof import("./extenders/Model").default;
PostTypes: typeof import("./extenders/PostTypes").default;
Routes: typeof import("./extenders/Routes").default;
Store: typeof import("./extenders/Store").default;
};
extend: typeof extend;
Session: typeof Session;

View File

@@ -0,0 +1,14 @@
import IExtender, { IExtensionModule } from './IExtender';
import Application from '../Application';
import ActualModel from '../Model';
export default class Model implements IExtender {
private readonly model;
private callbacks;
constructor(model: {
new (): ActualModel;
});
attribute<T, O = unknown>(name: string, transform?: ((attr: O) => T) | null): Model;
hasOne<M extends ActualModel>(name: string): Model;
hasMany<M extends ActualModel>(name: string): Model;
extend(app: Application, extension: IExtensionModule): void;
}

View File

@@ -0,0 +1,10 @@
import Application from '../Application';
import IExtender, { IExtensionModule } from './IExtender';
import Model from '../Model';
export default class Store implements IExtender {
private readonly models;
add(type: string, model: {
new (): Model;
}): Store;
extend(app: Application, extension: IExtensionModule): void;
}

View File

@@ -1,7 +1,11 @@
import Model from './Model';
import PostTypes from './PostTypes';
import Routes from './Routes';
import Store from './Store';
declare const _default: {
Model: typeof Model;
PostTypes: typeof PostTypes;
Routes: typeof Routes;
Store: typeof Store;
};
export default _default;

View File

@@ -71,8 +71,10 @@ import ForumApplication from './ForumApplication';
import isSafariMobile from './utils/isSafariMobile';
declare const _default: {
extenders: {
Model: typeof import("../common/extenders/Model").default;
PostTypes: typeof import("../common/extenders/PostTypes").default;
Routes: typeof import("../common/extenders/Routes").default;
Store: typeof import("../common/extenders/Store").default;
};
extend: typeof import("../common/extend");
Session: typeof import("../common/Session").default;

2
framework/core/js/dist/admin.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
framework/core/js/dist/forum.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long