Fix typescript errors (start raw decoding early)
This commit is contained in:
parent
e192fe5790
commit
3b84c2892c
|
@ -129,30 +129,13 @@ function createTsExport(
|
||||||
// case
|
// case
|
||||||
return tag(
|
return tag(
|
||||||
"array",
|
"array",
|
||||||
x.value.map((arrayItem): squiggleExpression => {
|
x.value.map(
|
||||||
switch (arrayItem.tag) {
|
(arrayItem): squiggleExpression =>
|
||||||
case "EvRecord":
|
convertRawToTypescript(
|
||||||
return tag(
|
arrayItem as unknown as rescriptExport,
|
||||||
"record",
|
environment
|
||||||
_.mapValues(arrayItem.value, (recordValue: unknown) =>
|
)
|
||||||
convertRawToTypescript(
|
)
|
||||||
recordValue as rescriptExport,
|
|
||||||
environment
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
case "EvArray":
|
|
||||||
let y = arrayItem.value as unknown as rescriptExport[];
|
|
||||||
return tag(
|
|
||||||
"array",
|
|
||||||
y.map((childArrayItem) =>
|
|
||||||
convertRawToTypescript(childArrayItem, environment)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
default:
|
|
||||||
return createTsExport(arrayItem, environment);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
);
|
||||||
case "EvArrayString":
|
case "EvArrayString":
|
||||||
return tag("arraystring", x.value);
|
return tag("arraystring", x.value);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user