typescript work in progress
This commit is contained in:
parent
710756bc50
commit
afffdd8559
|
@ -187,5 +187,7 @@ function createTsExport(
|
|||
return tag("lambdaDeclaration", x.value);
|
||||
case "EvTypeIdentifier":
|
||||
return tag("typeIdentifier", x.value);
|
||||
case "EvModule":
|
||||
return tag("module", x.value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,11 @@ export type rescriptExport =
|
|||
| {
|
||||
TAG: 13; // EvTypeIdentifier
|
||||
_0: string;
|
||||
};
|
||||
}
|
||||
| {
|
||||
TAG: 14; // EvModule
|
||||
_0: { [key: string]: rescriptExport };
|
||||
};
|
||||
|
||||
type rescriptDist =
|
||||
| { TAG: 0; _0: rescriptPointSetDist }
|
||||
|
@ -125,7 +129,8 @@ export type squiggleExpression =
|
|||
| tagged<"timeDuration", number>
|
||||
| tagged<"lambdaDeclaration", lambdaDeclaration>
|
||||
| tagged<"record", { [key: string]: squiggleExpression }>
|
||||
| tagged<"typeIdentifier", string>;
|
||||
| tagged<"typeIdentifier", string>
|
||||
| tagged<"module", { [key: string]: squiggleExpression }>;
|
||||
|
||||
export { lambdaValue };
|
||||
|
||||
|
@ -177,6 +182,11 @@ export function convertRawToTypescript(
|
|||
});
|
||||
case 13: // EvSymbol
|
||||
return tag("typeIdentifier", result._0);
|
||||
case 14: // EvModule
|
||||
return tag(
|
||||
"module",
|
||||
_.mapValues(result._0, (x) => convertRawToTypescript(x, environment))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user