GeezerVison is showing github.com — chore: fix ts errors · Juny0117/lowcode-engine@108108c
File tree
Expand file treeCollapse file tree
Open diff view settings
modules/code-generator/src
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: modules/code-generator/src/types/core.ts +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -178,7 +178,8 @@ export interface IProjectBuilder { |
178 | 178 | } |
179 | 179 |
|
180 | 180 | /** 项目级别的前置处理器 */ |
181 | | -export type ProjectPreProcessor = (schema: IPublicTypeProjectSchema) => Promise<IPublicTypeProjectSchema> | IPublicTypeProjectSchema; |
| 181 | +export type ProjectPreProcessor = (schema: IPublicTypeProjectSchema) => |
| 182 | + Promise<IPublicTypeProjectSchema> | IPublicTypeProjectSchema; |
182 | 183 |
|
183 | 184 | export interface ProjectPostProcessorOptions { |
184 | 185 | parseResult?: IParseResult; |
|
Collapse file
Copy file name to clipboardExpand all lines: modules/code-generator/src/utils/nodeToJSX.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -126,7 +126,7 @@ function generateAttrs( |
126 | 126 | if (props) { |
127 | 127 | if (!Array.isArray(props)) { |
128 | 128 | 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)); |
130 | 130 | }); |
131 | 131 | } else { |
132 | 132 | props.forEach((prop) => { |
|
Collapse file
Copy file name to clipboardExpand all lines: modules/code-generator/src/utils/schema.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -101,7 +101,7 @@ export function handleSubNodes<T>( |
101 | 101 | }); |
102 | 102 | } else { |
103 | 103 | Object.values(child.props).forEach((value) => { |
104 | | - const childRes = handleCompositeValueInProps(value); |
| 104 | + const childRes = handleCompositeValueInProps(value as IPublicTypeCompositeValue); |
105 | 105 | childrenRes.push(...childRes); |
106 | 106 | }); |
107 | 107 | } |
|