chore: fix ts errors

This commit is contained in:
LeoYuan 袁力皓 2023-03-10 16:00:00 +08:00
parent 7c6c758d42
commit 108108cf51
3 changed files with 4 additions and 3 deletions

View File

@ -178,7 +178,8 @@ export interface IProjectBuilder {
}
/** 项目级别的前置处理器 */
export type ProjectPreProcessor = (schema: IPublicTypeProjectSchema) => Promise<IPublicTypeProjectSchema> | IPublicTypeProjectSchema;
export type ProjectPreProcessor = (schema: IPublicTypeProjectSchema) =>
Promise<IPublicTypeProjectSchema> | IPublicTypeProjectSchema;
export interface ProjectPostProcessorOptions {
parseResult?: IParseResult;

View File

@ -126,7 +126,7 @@ function generateAttrs(
if (props) {
if (!Array.isArray(props)) {
Object.keys(props).forEach((propName: string) => {
pieces = pieces.concat(generateAttr(propName, props[propName], scope, config));
pieces = pieces.concat(generateAttr(propName, props[propName] as IPublicTypeCompositeValue, scope, config));
});
} else {
props.forEach((prop) => {

View File

@ -101,7 +101,7 @@ export function handleSubNodes<T>(
});
} else {
Object.values(child.props).forEach((value) => {
const childRes = handleCompositeValueInProps(value);
const childRes = handleCompositeValueInProps(value as IPublicTypeCompositeValue);
childrenRes.push(...childRes);
});
}