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