Skip to content

Commit 108108c

Browse files
committed
chore: fix ts errors
1 parent 7c6c758 commit 108108c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

modules/code-generator/src/types/core.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ export interface IProjectBuilder {
178178
}
179179

180180
/** 项目级别的前置处理器 */
181-
export type ProjectPreProcessor = (schema: IPublicTypeProjectSchema) => Promise<IPublicTypeProjectSchema> | IPublicTypeProjectSchema;
181+
export type ProjectPreProcessor = (schema: IPublicTypeProjectSchema) =>
182+
Promise<IPublicTypeProjectSchema> | IPublicTypeProjectSchema;
182183

183184
export interface ProjectPostProcessorOptions {
184185
parseResult?: IParseResult;

modules/code-generator/src/utils/nodeToJSX.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function generateAttrs(
126126
if (props) {
127127
if (!Array.isArray(props)) {
128128
Object.keys(props).forEach((propName: string) => {
129-
pieces = pieces.concat(generateAttr(propName, props[propName], scope, config));
129+
pieces = pieces.concat(generateAttr(propName, props[propName] as IPublicTypeCompositeValue, scope, config));
130130
});
131131
} else {
132132
props.forEach((prop) => {

modules/code-generator/src/utils/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function handleSubNodes<T>(
101101
});
102102
} else {
103103
Object.values(child.props).forEach((value) => {
104-
const childRes = handleCompositeValueInProps(value);
104+
const childRes = handleCompositeValueInProps(value as IPublicTypeCompositeValue);
105105
childrenRes.push(...childRes);
106106
});
107107
}

0 commit comments

Comments
 (0)