mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-10 14:13:01 +08:00
style(data-source): 去掉any
This commit is contained in:
parent
7f48b4d9f5
commit
131ec6fff3
@ -38,6 +38,7 @@
|
||||
"lodash-es": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tmagic/core": "1.3.0-alpha.21",
|
||||
"@types/events": "^3.0.0",
|
||||
"@types/lodash-es": "^4.17.4",
|
||||
"@types/node": "^15.12.4",
|
||||
|
@ -20,6 +20,7 @@ import EventEmitter from 'events';
|
||||
|
||||
import { cloneDeep, template } from 'lodash-es';
|
||||
|
||||
import type Core from '@tmagic/core';
|
||||
import type { DataSourceSchema, Id, MNode } from '@tmagic/schema';
|
||||
import { compiledCond, compiledNode } from '@tmagic/utils';
|
||||
|
||||
@ -37,7 +38,7 @@ class DataSourceManager extends EventEmitter {
|
||||
return DataSourceManager.dataSourceClassMap.get(type);
|
||||
}
|
||||
|
||||
public app: any;
|
||||
public app: Core;
|
||||
|
||||
public dataSourceMap = new Map<string, DataSource>();
|
||||
|
||||
@ -48,7 +49,7 @@ class DataSourceManager extends EventEmitter {
|
||||
|
||||
this.app = app;
|
||||
|
||||
app.dsl?.dataSources?.forEach((config: any) => {
|
||||
app.dsl?.dataSources?.forEach((config) => {
|
||||
this.addDataSource(config);
|
||||
});
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
*/
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
|
||||
import type Core from '@tmagic/core';
|
||||
import { getDepNodeIds, getNodes, replaceChildNode } from '@tmagic/utils';
|
||||
|
||||
import DataSourceManager from './DataSourceManager';
|
||||
@ -27,7 +28,7 @@ import DataSourceManager from './DataSourceManager';
|
||||
* @param httpDataSourceOptions http 数据源配置
|
||||
* @returns DataSourceManager
|
||||
*/
|
||||
export const createDataSourceManager = (app: any) => {
|
||||
export const createDataSourceManager = (app: Core) => {
|
||||
const { dsl, platform } = app;
|
||||
if (!dsl?.dataSources) return;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import type Core from '@tmagic/core';
|
||||
import type { DataSourceSchema } from '@tmagic/schema';
|
||||
|
||||
export interface DataSourceOptions {
|
||||
@ -31,7 +32,7 @@ export interface HttpDataSourceOptions {
|
||||
}
|
||||
|
||||
export interface DataSourceManagerOptions {
|
||||
app: any;
|
||||
app: Core;
|
||||
}
|
||||
|
||||
export interface DataSourceManagerData {
|
||||
|
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@ -206,6 +206,9 @@ importers:
|
||||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
devDependencies:
|
||||
'@tmagic/core':
|
||||
specifier: 1.3.0-alpha.21
|
||||
version: link:../core
|
||||
'@types/events':
|
||||
specifier: ^3.0.0
|
||||
version: 3.0.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user