Browse Source

无JIRA chore: 增加BI.Plugin描述

es6
zsmj1994 4 years ago
parent
commit
9781752afe
  1. 16
      typescript/core/plugin.ts
  2. 2
      typescript/index.ts

16
typescript/core/plugin.ts

@ -0,0 +1,16 @@
import {_Widget} from "./widget";
type configWidgetFn = (options: object) => object
type configObjectFn = (widget: _Widget) => void
export type _config = (widgetFunction: configWidgetFn | configWidgetFn[], objectFunction: configObjectFn | configObjectFn[]) => void
export type _configWidget = (shorcut: string, widgetFunction: configWidgetFn) => void
export type _registerObject = (shorcut: string, objectFunction: configObjectFn) => void
export type _Plugin = {
config: _config;
configWidget: _configWidget;
registerObject: _registerObject;
}

2
typescript/index.ts

@ -33,6 +33,7 @@ import { _RedMarkBehavior } from "./core/behavior/behavior.redmark";
import * as decorator from "./core/decorator/decorator"; import * as decorator from "./core/decorator/decorator";
import { _func } from "./core/func"; import { _func } from "./core/func";
import { _i18n } from "./core/i18n"; import { _i18n } from "./core/i18n";
import { _Plugin } from "./core/plugin";
import { _OB } from "./core/ob"; import { _OB } from "./core/ob";
import { _Widget, _WidgetStatic } from "./core/widget"; import { _Widget, _WidgetStatic } from "./core/widget";
import { _Layout } from "./core/wrapper/layout"; import { _Layout } from "./core/wrapper/layout";
@ -50,6 +51,7 @@ type ClassConstructor<T extends {}> = T & {
export interface BI extends _func, _i18n, _base { export interface BI extends _func, _i18n, _base {
OB: ClassConstructor<_OB>; OB: ClassConstructor<_OB>;
Plugin:_Plugin;
Widget: ClassConstructor<_Widget> & _WidgetStatic; Widget: ClassConstructor<_Widget> & _WidgetStatic;
Single: ClassConstructor<_Single>; Single: ClassConstructor<_Single>;
BasicButton: ClassConstructor<_BasicButton> & _BasicButtonStatic; BasicButton: ClassConstructor<_BasicButton> & _BasicButtonStatic;

Loading…
Cancel
Save