fix code
This commit is contained in:
parent
2f459afaa0
commit
51e3a205b7
|
|
@ -85,11 +85,19 @@ export const declareScope = (p: PG, meta: IMeta, monaco: Monaco) => {
|
|||
|
||||
if (comp && comp.typings) {
|
||||
try {
|
||||
const fn = new Function(`\
|
||||
const arg = {
|
||||
...exports,
|
||||
params,
|
||||
};
|
||||
|
||||
const fn = new Function(
|
||||
...Object.keys(arg),
|
||||
`\
|
||||
${comp.typings};
|
||||
return typings;
|
||||
`);
|
||||
const result = fn();
|
||||
`
|
||||
);
|
||||
const result = fn(...Object.values(arg));
|
||||
if (typeof result === "object" && typeof result._raw === "object") {
|
||||
for (const [k, v] of Object.entries(result._raw) as any) {
|
||||
comp_types[k] = v;
|
||||
|
|
|
|||
|
|
@ -322,7 +322,6 @@ const treeClasses = {
|
|||
placeholder: "placeholder",
|
||||
draggingSource: css`
|
||||
background: #e4f0ff;
|
||||
|
||||
cursor: not-allowed;
|
||||
`,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue