Browse Source

KERNEL-1752 refactor: 更改fineui中BI的描述

es6
iapyang 5 years ago
parent
commit
62287cabc8
  1. 3
      tsconfig.json
  2. 2
      types/globals.d.ts
  3. 3
      typescript/bundle.ts
  4. 2
      typescript/core/decorator/decorator.ts
  5. 6
      typescript/index.ts
  6. 2
      webpack/webpack.common.js

3
tsconfig.json

@ -13,8 +13,9 @@
"outDir": "./bin", "outDir": "./bin",
"baseUrl": ".", "baseUrl": ".",
// "strict": true, // "strict": true,
// "strictNullChecks": true, "strictNullChecks": true,
"noImplicitAny": true, "noImplicitAny": true,
"noImplicitThis": true,
"noUnusedLocals": true, "noUnusedLocals": true,
"noUnusedParameters": true, "noUnusedParameters": true,
"noImplicitReturns": true, "noImplicitReturns": true,

2
types/fineui.d.ts → types/globals.d.ts vendored

@ -2,7 +2,7 @@ interface Obj {
[key: string]: any; [key: string]: any;
} }
declare let BI: Obj & import("../typescript/index")._BI; declare let BI: Obj & import("../typescript/index").BI;
// declare let BI: Obj; // declare let BI: Obj;

3
typescript/bundle.ts

@ -0,0 +1,3 @@
import fineui from "./index";
BI.extend(BI, fineui);

2
typescript/core/decorator/decorator.ts

@ -83,4 +83,4 @@ type UnionToTupleRecursively_<Union, Element, Result extends ReadonlyArray<any>>
UnionToTupleRecursively<Exclude<Union, Element>, Prepend<Element, Result>>; UnionToTupleRecursively<Exclude<Union, Element>, Prepend<Element, Result>>;
type UnionToTuple<U> = UnionToTupleRecursively<U, []>; type UnionToTuple<U> = UnionToTupleRecursively<U, []>;
*/ */

6
typescript/index.ts

@ -22,7 +22,7 @@ type ClassConstructor<T extends {}> = T & {
readonly prototype: T; readonly prototype: T;
} }
export interface _BI extends _func, _i18n, _base { export interface BI extends _func, _i18n, _base {
OB: ClassConstructor<_OB>; OB: ClassConstructor<_OB>;
Widget: ClassConstructor<_Widget> & _WidgetStatic; Widget: ClassConstructor<_Widget> & _WidgetStatic;
Single: ClassConstructor<_Single>; Single: ClassConstructor<_Single>;
@ -40,6 +40,6 @@ export interface _BI extends _func, _i18n, _base {
Decorators: typeof decorator; Decorators: typeof decorator;
} }
BI = BI.extend(BI, { export default {
Decorators: decorator, Decorators: decorator,
}) as any; };

2
webpack/webpack.common.js

@ -26,7 +26,7 @@ module.exports = {
"es6-promise/auto", "es6-promise/auto",
], ],
fineui: [ fineui: [
"./typescript/index.ts", "./typescript/bundle.ts",
], ],
}, },
resolve: { resolve: {

Loading…
Cancel
Save