mirror of
https://github.com/flarum/framework.git
synced 2025-04-25 06:04:04 +08:00
Bundled output for commit 351410677fc8b94d0380bf7be015b939947941d2
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
parent
351410677f
commit
737e49a5ef
26
framework/core/js/dist-typings/@types/translator-icu-rich.d.ts
vendored
Normal file
26
framework/core/js/dist-typings/@types/translator-icu-rich.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
declare module '@askvortsov/rich-icu-message-formatter' {
|
||||
type IValues = Record<string, any>;
|
||||
|
||||
type ITypeHandler = (
|
||||
value: string,
|
||||
matches: string,
|
||||
locale: string,
|
||||
values: IValues,
|
||||
format: (message: string, values: IValues) => string
|
||||
) => string;
|
||||
type IRichHandler = (tag: any, values: IValues, contents: string) => any;
|
||||
|
||||
type ValueOrArray<T> = T | ValueOrArray<T>[];
|
||||
type NestedStringArray = ValueOrArray<string>;
|
||||
|
||||
export class RichMessageFormatter {
|
||||
locale: string | null;
|
||||
constructor(locale: string | null, typeHandlers: Record<string, ITypeHandler>, richHandler: IRichHandler);
|
||||
|
||||
format(message: string, values: IValues): string;
|
||||
process(message: string, values: IValues): NestedStringArray;
|
||||
rich(message: string, values: IValues): NestedStringArray;
|
||||
}
|
||||
|
||||
export function mithrilRichHandler(tag: any, values: IValues, contents: string): any;
|
||||
}
|
17
framework/core/js/dist-typings/@types/translator-icu.d.ts
vendored
Normal file
17
framework/core/js/dist-typings/@types/translator-icu.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
declare module '@ultraq/icu-message-formatter' {
|
||||
export function pluralTypeHandler(
|
||||
value: string,
|
||||
matches: string,
|
||||
locale: string,
|
||||
values: Record<string, any>,
|
||||
format: (text: string, values: Record<string, any>) => string
|
||||
): string;
|
||||
|
||||
export function selectTypeHandler(
|
||||
value: string,
|
||||
matches: string,
|
||||
locale: string,
|
||||
values: Record<string, any>,
|
||||
format: (text: string, values: Record<string, any>) => string
|
||||
): string;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||
export interface ILoadingModalAttrs extends IInternalModalAttrs {
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||
import ExtensionReadme from '../models/ExtensionReadme';
|
||||
import type Mithril from 'mithril';
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import type Mithril from 'mithril';
|
||||
import type User from '../../common/models/User';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference path="../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../@types/translator-icu-rich.d.ts" />
|
||||
import { RichMessageFormatter } from '@askvortsov/rich-icu-message-formatter';
|
||||
import { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';
|
||||
declare type Translations = Record<string, string>;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from './Modal';
|
||||
import ItemList from '../utils/ItemList';
|
||||
import Stream from '../utils/Stream';
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||
import Stream from '../../common/utils/Stream';
|
||||
import Mithril from 'mithril';
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import Stream from '../../common/utils/Stream';
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
||||
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import Stream from '../../common/utils/Stream';
|
||||
|
Loading…
x
Reference in New Issue
Block a user