fix: 优化 supports: any 的定义

This commit is contained in:
humphry.hy 2021-11-10 18:07:48 +08:00
parent f9734e8a7e
commit f7c57b801d

View File

@ -9,6 +9,7 @@ import {
TransformedComponentMetadata,
ConfigureSupport,
OneOfType,
ConfigureSupportEvent,
} from '@ali/lowcode-types';
function propConfigToFieldConfig(propConfig: PropConfig): FieldConfig {
@ -204,7 +205,7 @@ export default function (metadata: TransformedComponentMetadata): TransformedCom
};
}
const { component = {}, supports = {} } = configure;
const supportedEvents: any[] | null = (supports as any).events ? null : [];
const supportedEvents: ConfigureSupportEvent[] | null = supports.events ? null : [];
const props: FieldConfig[] = [];
metadata.props.forEach((prop) => {