rename and stringify enum tags

This commit is contained in:
Vyacheslav Matyukhin 2022-08-28 21:33:16 +04:00
parent b50061a91a
commit 481483e937
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C
19 changed files with 141 additions and 144 deletions

View File

@ -1,10 +1,10 @@
import * as React from "react";
import {
Distribution,
SqDistribution,
result,
DistributionError,
SqDistributionError,
resultMap,
SquiggleRecord,
SqRecord,
environment,
} from "@quri/squiggle-lang";
import { Vega } from "react-vega";
@ -33,11 +33,11 @@ export type DistributionChartProps = {
height: number;
} & DistributionPlottingSettings;
export function defaultPlot(distribution: Distribution): Plot {
export function defaultPlot(distribution: SqDistribution): Plot {
return { distributions: [{ name: "default", distribution }] };
}
export function makePlot(record: SquiggleRecord): Plot | void {
export function makePlot(record: SqRecord): Plot | void {
const plotResult = parsePlot(record);
if (plotResult.tag === "Ok") {
return plotResult.value;
@ -129,7 +129,7 @@ const Cell: React.FC<{ children: React.ReactNode }> = ({ children }) => (
);
type SummaryTableProps = {
distribution: Distribution;
distribution: SqDistribution;
environment: environment;
};
@ -147,11 +147,11 @@ const SummaryTable: React.FC<SummaryTableProps> = ({
const p90 = distribution.inv(environment, 0.9);
const p95 = distribution.inv(environment, 0.95);
const hasResult = (x: result<number, DistributionError>): boolean =>
const hasResult = (x: result<number, SqDistributionError>): boolean =>
x.tag === "Ok";
const unwrapResult = (
x: result<number, DistributionError>
x: result<number, SqDistributionError>
): React.ReactNode => {
if (x.tag === "Ok") {
return <NumberShower number={x.value} />;

View File

@ -1,5 +1,5 @@
import * as React from "react";
import { Lambda, environment } from "@quri/squiggle-lang";
import { SqLambda, environment } from "@quri/squiggle-lang";
import { FunctionChart1Dist } from "./FunctionChart1Dist";
import { FunctionChart1Number } from "./FunctionChart1Number";
import { DistributionPlottingSettings } from "./DistributionChart";
@ -12,7 +12,7 @@ export type FunctionChartSettings = {
};
interface FunctionChartProps {
fn: Lambda;
fn: SqLambda;
chartSettings: FunctionChartSettings;
distributionPlotSettings: DistributionPlottingSettings;
environment: environment;

View File

@ -1,7 +1,12 @@
import * as React from "react";
import _ from "lodash";
import type { Spec } from "vega";
import { Distribution, result, Lambda, environment } from "@quri/squiggle-lang";
import {
SqDistribution,
result,
SqLambda,
environment,
} from "@quri/squiggle-lang";
import { createClassFromSpec } from "react-vega";
import * as percentilesSpec from "../vega-specs/spec-percentiles.json";
import {
@ -37,7 +42,7 @@ export type FunctionChartSettings = {
};
interface FunctionChart1DistProps {
fn: Lambda;
fn: SqLambda;
chartSettings: FunctionChartSettings;
distributionPlotSettings: DistributionPlottingSettings;
environment: environment;
@ -68,7 +73,7 @@ type errors = _.Dictionary<
}[]
>;
type point = { x: number; value: result<Distribution, string> };
type point = { x: number; value: result<SqDistribution, string> };
let getPercentiles = ({ chartSettings, fn, environment }) => {
throw new Error("NOT IMPLEMENTED IN 0.4 YET");

View File

@ -1,7 +1,7 @@
import * as React from "react";
import _ from "lodash";
import type { Spec } from "vega";
import { result, Lambda, environment } from "@quri/squiggle-lang";
import { result, SqLambda, environment } from "@quri/squiggle-lang";
import { createClassFromSpec } from "react-vega";
import * as lineChartSpec from "../vega-specs/spec-line-chart.json";
import { ErrorAlert } from "./Alert";
@ -24,7 +24,7 @@ export type FunctionChartSettings = {
};
interface FunctionChart1NumberProps {
fn: Lambda;
fn: SqLambda;
chartSettings: FunctionChartSettings;
environment: environment;
height: number;

View File

@ -1,9 +1,5 @@
import * as React from "react";
import {
SquiggleValue,
environment,
defaultEnvironment,
} from "@quri/squiggle-lang";
import { SqValue, environment, defaultEnvironment } from "@quri/squiggle-lang";
import { useSquiggle } from "../lib/hooks";
import { SquiggleViewer } from "./SquiggleViewer";
@ -23,7 +19,7 @@ export interface SquiggleChartProps {
/** If the result is a function, the amount of stops sampled */
diagramCount?: number;
/** When the squiggle code gets reevaluated */
onChange?(expr: SquiggleValue | undefined): void;
onChange?(expr: SqValue | undefined): void;
/** CSS width of the element */
width?: number;
height?: number;

View File

@ -1,9 +1,9 @@
import { ErrorValue } from "@quri/squiggle-lang";
import { SqError } from "@quri/squiggle-lang";
import React from "react";
import { ErrorAlert } from "./Alert";
type Props = {
error: ErrorValue;
error: SqError;
};
export const SquiggleErrorAlert: React.FC<Props> = ({ error }) => {

View File

@ -1,9 +1,5 @@
import React, { useContext } from "react";
import {
DistributionTag,
SquiggleValue,
SquiggleValueTag,
} from "@quri/squiggle-lang";
import { SqDistributionTag, SqValue, SqValueTag } from "@quri/squiggle-lang";
import { NumberShower } from "../NumberShower";
import { DistributionChart, defaultPlot, makePlot } from "../DistributionChart";
import { FunctionChart, FunctionChartSettings } from "../FunctionChart";
@ -56,7 +52,7 @@ const VariableList: React.FC<{
export interface Props {
/** The output of squiggle's run */
expression: SquiggleValue;
expression: SqValue;
/** Path to the current item, e.g. `['foo', 'bar', '3']` for `foo.bar[3]`; can be empty on the top-level item. */
path: string[];
width?: number;
@ -77,7 +73,7 @@ export const ExpressionViewer: React.FC<Props> = ({
);
}
switch (expression.tag) {
case SquiggleValueTag.SvtNumber:
case SqValueTag.Number:
return (
<VariableBox path={path} heading="Number">
{() => (
@ -87,13 +83,13 @@ export const ExpressionViewer: React.FC<Props> = ({
)}
</VariableBox>
);
case SquiggleValueTag.SvtDistribution: {
case SqValueTag.Distribution: {
const distType = expression.value.tag;
return (
<VariableBox
path={path}
heading={`Distribution (${distType})\n${
distType === DistributionTag.DtSymbolic
distType === SqDistributionTag.Symbolic
? expression.value.toString()
: ""
}`}
@ -127,7 +123,7 @@ export const ExpressionViewer: React.FC<Props> = ({
</VariableBox>
);
}
case SquiggleValueTag.SvtString:
case SqValueTag.String:
return (
<VariableBox path={path} heading="String">
{() => (
@ -141,13 +137,13 @@ export const ExpressionViewer: React.FC<Props> = ({
)}
</VariableBox>
);
case SquiggleValueTag.SvtBool:
case SqValueTag.Bool:
return (
<VariableBox path={path} heading="Boolean">
{() => expression.value.toString()}
</VariableBox>
);
case SquiggleValueTag.SvtSymbol:
case SqValueTag.Symbol:
return (
<VariableBox path={path} heading="Symbol">
{() => (
@ -158,38 +154,38 @@ export const ExpressionViewer: React.FC<Props> = ({
)}
</VariableBox>
);
case SquiggleValueTag.SvtCall:
case SqValueTag.Call:
return (
<VariableBox path={path} heading="Call">
{() => expression.value}
</VariableBox>
);
case SquiggleValueTag.SvtArrayString:
case SqValueTag.ArrayString:
return (
<VariableBox path={path} heading="Array String">
{() => expression.value.map((r) => `"${r}"`).join(", ")}
</VariableBox>
);
case SquiggleValueTag.SvtDate:
case SqValueTag.Date:
return (
<VariableBox path={path} heading="Date">
{() => expression.value.toDateString()}
</VariableBox>
);
case SquiggleValueTag.SvtVoid:
case SqValueTag.Void:
return (
<VariableBox path={path} heading="Void">
{() => "Void"}
</VariableBox>
);
case SquiggleValueTag.SvtTimeDuration: {
case SqValueTag.TimeDuration: {
return (
<VariableBox path={path} heading="Time Duration">
{() => <NumberShower precision={3} number={expression.value} />}
</VariableBox>
);
}
case SquiggleValueTag.SvtLambda:
case SqValueTag.Lambda:
return (
<VariableBox
path={path}
@ -223,7 +219,7 @@ export const ExpressionViewer: React.FC<Props> = ({
)}
</VariableBox>
);
case SquiggleValueTag.SvtDeclaration: {
case SqValueTag.Declaration: {
return (
<VariableBox
path={path}
@ -254,7 +250,7 @@ export const ExpressionViewer: React.FC<Props> = ({
</VariableBox>
);
}
case SquiggleValueTag.SvtModule: {
case SqValueTag.Module: {
return (
<VariableList path={path} heading="Module">
{(_) =>
@ -272,7 +268,7 @@ export const ExpressionViewer: React.FC<Props> = ({
</VariableList>
);
}
case SquiggleValueTag.SvtRecord:
case SqValueTag.Record:
const plot = makePlot(expression.value);
if (plot) {
return (
@ -330,7 +326,7 @@ export const ExpressionViewer: React.FC<Props> = ({
</VariableList>
);
}
case SquiggleValueTag.SvtArray:
case SqValueTag.Array:
return (
<VariableList path={path} heading="Array">
{(_) =>

View File

@ -1,5 +1,5 @@
import { shape } from "@quri/squiggle-lang";
import { SqShape } from "@quri/squiggle-lang";
export const hasMassBelowZero = (shape: shape) =>
export const hasMassBelowZero = (shape: SqShape) =>
shape.continuous.some((x) => x.x <= 0) ||
shape.discrete.some((x) => x.x <= 0);

View File

@ -1,4 +1,4 @@
import { environment, run, SquiggleValue } from "@quri/squiggle-lang";
import { environment, run, SqValue } from "@quri/squiggle-lang";
import { useEffect, useMemo } from "react";
type SquiggleArgs = {
@ -6,7 +6,7 @@ type SquiggleArgs = {
executionId?: number;
// jsImports?: jsImports;
environment?: environment;
onChange?: (expr: SquiggleValue | undefined) => void;
onChange?: (expr: SqValue | undefined) => void;
};
export const useSquiggle = (args: SquiggleArgs) => {

View File

@ -1,9 +1,9 @@
import * as yup from "yup";
import { Distribution, result, SquiggleRecord } from "@quri/squiggle-lang";
import { SqDistribution, result, SqRecord } from "@quri/squiggle-lang";
export type LabeledDistribution = {
name: string;
distribution: Distribution;
distribution: SqDistribution;
color?: string;
};
@ -53,7 +53,7 @@ const schema = yup
}),
});
export function parsePlot(record: SquiggleRecord): result<Plot, string> {
export function parsePlot(record: SqRecord): result<Plot, string> {
try {
const plotRecord = schema.validateSync(record);
return ok({

View File

@ -70,7 +70,7 @@ const valueMethod = <IR>(
};
export class SqPointSetDistribution extends SqAbstractDistribution {
tag = Tag.DtPointSet;
tag = Tag.PointSet;
value() {
return valueMethod(this, RSDistribution.getPointSet);
@ -78,7 +78,7 @@ export class SqPointSetDistribution extends SqAbstractDistribution {
}
export class SqSampleSetDistribution extends SqAbstractDistribution {
tag = Tag.DtSampleSet;
tag = Tag.SampleSet;
value() {
return valueMethod(this, RSDistribution.getSampleSet);
@ -86,7 +86,7 @@ export class SqSampleSetDistribution extends SqAbstractDistribution {
}
export class SqSymbolicDistribution extends SqAbstractDistribution {
tag = Tag.DtSymbolic;
tag = Tag.Symbolic;
value() {
return valueMethod(this, RSDistribution.getSymbolic);
@ -94,9 +94,9 @@ export class SqSymbolicDistribution extends SqAbstractDistribution {
}
const tagToClass = {
[Tag.DtPointSet]: SqPointSetDistribution,
[Tag.DtSampleSet]: SqSampleSetDistribution,
[Tag.DtSymbolic]: SqSymbolicDistribution,
[Tag.PointSet]: SqPointSetDistribution,
[Tag.SampleSet]: SqSampleSetDistribution,
[Tag.Symbolic]: SqSymbolicDistribution,
} as const;
export type SqDistribution =

View File

@ -44,7 +44,7 @@ const valueMethod = <IR>(
};
export class SqMixedPointSetDist extends SqAbstractPointSetDist {
tag = Tag.PstMixed as const;
tag = Tag.Mixed as const;
get value(): RSPointSetDist.mixedShape {
return valueMethod(this, RSPointSetDist.getMixed);
@ -60,7 +60,7 @@ export class SqMixedPointSetDist extends SqAbstractPointSetDist {
}
export class SqDiscretePointSetDist extends SqAbstractPointSetDist {
tag = Tag.PstDiscrete as const;
tag = Tag.Discrete as const;
get value(): RSPointSetDist.discreteShape {
return valueMethod(this, RSPointSetDist.getDiscrete);
@ -76,7 +76,7 @@ export class SqDiscretePointSetDist extends SqAbstractPointSetDist {
}
export class SqContinuousPointSetDist extends SqAbstractPointSetDist {
tag = Tag.PstContinuous as const;
tag = Tag.Continuous as const;
get value(): RSPointSetDist.continuousShape {
return valueMethod(this, RSPointSetDist.getContinues);
@ -92,9 +92,9 @@ export class SqContinuousPointSetDist extends SqAbstractPointSetDist {
}
const tagToClass = {
[Tag.PstMixed]: SqMixedPointSetDist,
[Tag.PstDiscrete]: SqDiscretePointSetDist,
[Tag.PstContinuous]: SqContinuousPointSetDist,
[Tag.Mixed]: SqMixedPointSetDist,
[Tag.Discrete]: SqDiscretePointSetDist,
[Tag.Continuous]: SqContinuousPointSetDist,
} as const;
export type SqPointSetDist =

View File

@ -37,7 +37,7 @@ const valueMethod = <IR>(
};
export class SqArrayValue extends SqAbstractValue {
tag = Tag.SvtArray as const;
tag = Tag.Array as const;
get value() {
return new SqArray(valueMethod(this, RSValue.getArray));
@ -45,7 +45,7 @@ export class SqArrayValue extends SqAbstractValue {
}
export class SqArrayStringValue extends SqAbstractValue {
tag = Tag.SvtArrayString as const;
tag = Tag.ArrayString as const;
get value() {
return valueMethod(this, RSValue.getArrayString);
@ -53,7 +53,7 @@ export class SqArrayStringValue extends SqAbstractValue {
}
export class SqBoolValue extends SqAbstractValue {
tag = Tag.SvtBool as const;
tag = Tag.Bool as const;
get value() {
return valueMethod(this, RSValue.getBool);
@ -61,7 +61,7 @@ export class SqBoolValue extends SqAbstractValue {
}
export class SqCallValue extends SqAbstractValue {
tag = Tag.SvtCall as const;
tag = Tag.Call as const;
get value() {
return valueMethod(this, RSValue.getCall);
@ -69,7 +69,7 @@ export class SqCallValue extends SqAbstractValue {
}
export class SqDateValue extends SqAbstractValue {
tag = Tag.SvtDate as const;
tag = Tag.Date as const;
get value() {
return valueMethod(this, RSValue.getDate);
@ -77,7 +77,7 @@ export class SqDateValue extends SqAbstractValue {
}
export class SqDeclarationValue extends SqAbstractValue {
tag = Tag.SvtDeclaration as const;
tag = Tag.Declaration as const;
get value() {
return new SqLambdaDeclaration(valueMethod(this, RSValue.getDeclaration));
@ -85,7 +85,7 @@ export class SqDeclarationValue extends SqAbstractValue {
}
export class SqDistributionValue extends SqAbstractValue {
tag = Tag.SvtDistribution as const;
tag = Tag.Distribution as const;
get value() {
return wrapDistribution(valueMethod(this, RSValue.getDistribution));
@ -93,7 +93,7 @@ export class SqDistributionValue extends SqAbstractValue {
}
export class SqLambdaValue extends SqAbstractValue {
tag = Tag.SvtLambda as const;
tag = Tag.Lambda as const;
get value() {
return new SqLambda(valueMethod(this, RSValue.getLambda));
@ -101,7 +101,7 @@ export class SqLambdaValue extends SqAbstractValue {
}
export class SqModuleValue extends SqAbstractValue {
tag = Tag.SvtModule as const;
tag = Tag.Module as const;
get value() {
return new SqModule(valueMethod(this, RSValue.getModule));
@ -109,7 +109,7 @@ export class SqModuleValue extends SqAbstractValue {
}
export class SqNumberValue extends SqAbstractValue {
tag = Tag.SvtNumber as const;
tag = Tag.Number as const;
get value() {
return valueMethod(this, RSValue.getNumber);
@ -117,7 +117,7 @@ export class SqNumberValue extends SqAbstractValue {
}
export class SqRecordValue extends SqAbstractValue {
tag = Tag.SvtRecord as const;
tag = Tag.Record as const;
get value() {
return new SqRecord(valueMethod(this, RSValue.getRecord));
@ -125,7 +125,7 @@ export class SqRecordValue extends SqAbstractValue {
}
export class SqStringValue extends SqAbstractValue {
tag = Tag.SvtString as const;
tag = Tag.String as const;
get value(): string {
return valueMethod(this, RSValue.getString);
@ -133,7 +133,7 @@ export class SqStringValue extends SqAbstractValue {
}
export class SqSymbolValue extends SqAbstractValue {
tag = Tag.SvtSymbol as const;
tag = Tag.Symbol as const;
get value(): string {
return valueMethod(this, RSValue.getSymbol);
@ -141,7 +141,7 @@ export class SqSymbolValue extends SqAbstractValue {
}
export class SqTimeDurationValue extends SqAbstractValue {
tag = Tag.SvtTimeDuration as const;
tag = Tag.TimeDuration as const;
get value() {
return valueMethod(this, RSValue.getTimeDuration);
@ -149,7 +149,7 @@ export class SqTimeDurationValue extends SqAbstractValue {
}
export class SqTypeValue extends SqAbstractValue {
tag = Tag.SvtType as const;
tag = Tag.Type as const;
get value() {
return new SqType(valueMethod(this, RSValue.getType));
@ -157,7 +157,7 @@ export class SqTypeValue extends SqAbstractValue {
}
export class SqTypeIdentifierValue extends SqAbstractValue {
tag = Tag.SvtTypeIdentifier as const;
tag = Tag.TypeIdentifier as const;
get value() {
return valueMethod(this, RSValue.getTypeIdentifier);
@ -165,27 +165,27 @@ export class SqTypeIdentifierValue extends SqAbstractValue {
}
export class SqVoidValue extends SqAbstractValue {
tag = Tag.SvtVoid as const;
tag = Tag.Void as const;
}
const tagToClass = {
[Tag.SvtArray]: SqArrayValue,
[Tag.SvtArrayString]: SqArrayStringValue,
[Tag.SvtBool]: SqBoolValue,
[Tag.SvtCall]: SqCallValue,
[Tag.SvtDate]: SqDateValue,
[Tag.SvtDeclaration]: SqDeclarationValue,
[Tag.SvtDistribution]: SqDistributionValue,
[Tag.SvtLambda]: SqLambdaValue,
[Tag.SvtModule]: SqModuleValue,
[Tag.SvtNumber]: SqNumberValue,
[Tag.SvtRecord]: SqRecordValue,
[Tag.SvtString]: SqStringValue,
[Tag.SvtSymbol]: SqSymbolValue,
[Tag.SvtTimeDuration]: SqTimeDurationValue,
[Tag.SvtType]: SqTypeValue,
[Tag.SvtTypeIdentifier]: SqTypeIdentifierValue,
[Tag.SvtVoid]: SqVoidValue,
[Tag.Array]: SqArrayValue,
[Tag.ArrayString]: SqArrayStringValue,
[Tag.Bool]: SqBoolValue,
[Tag.Call]: SqCallValue,
[Tag.Date]: SqDateValue,
[Tag.Declaration]: SqDeclarationValue,
[Tag.Distribution]: SqDistributionValue,
[Tag.Lambda]: SqLambdaValue,
[Tag.Module]: SqModuleValue,
[Tag.Number]: SqNumberValue,
[Tag.Record]: SqRecordValue,
[Tag.String]: SqStringValue,
[Tag.Symbol]: SqSymbolValue,
[Tag.TimeDuration]: SqTimeDurationValue,
[Tag.Type]: SqTypeValue,
[Tag.TypeIdentifier]: SqTypeIdentifierValue,
[Tag.Void]: SqVoidValue,
} as const;
// FIXME

View File

@ -11,13 +11,13 @@ type environment = ForTS_Distribution_Environment.environment //use
let defaultEnvironment: environment = DistributionOperation.defaultEnv
@module("./ForTS_Distribution_tag") @scope("distributionTag")
external dtPointSet_: int = "DtPointSet"
external dtPointSet_: int = "PointSet"
@module("./ForTS_Distribution_tag") @scope("distributionTag")
external dtSampleSet_: int = "DtSampleSet"
external dtSampleSet_: int = "SampleSet"
@module("./ForTS_Distribution_tag") @scope("distributionTag")
external dtSymbolic_: int = "DtSymbolic"
external dtSymbolic_: int = "Symbolic"
@genType.import("./ForTS_Distribution_tag")
type distributionTag

View File

@ -4,13 +4,13 @@
@genType type mixedShape = PointSetTypes.mixedShape
@module("./ForTS_Distribution_PointSetDistribution_tag") @scope("pointSetDistributionTag")
external pstMixed_: int = "PstMixed"
external pstMixed_: int = "Mixed"
@module("./ForTS_Distribution_PointSetDistribution_tag") @scope("pointSetDistributionTag")
external pstDiscrete_: int = "PstDiscrete"
external pstDiscrete_: int = "Discrete"
@module("./ForTS_Distribution_PointSetDistribution_tag") @scope("pointSetDistributionTag")
external pstContinuous_: int = "PstContinuous"
external pstContinuous_: int = "Continuous"
@genType.import("./ForTS_Distribution_PointSetDistribution_tag")
type pointSetDistributionTag

View File

@ -1,5 +1,5 @@
export enum pointSetDistributionTag {
PstMixed,
PstDiscrete,
PstContinuous,
Mixed = "Mixed",
Discrete = "Discrete",
Continuous = "Continuous",
}

View File

@ -1,5 +1,5 @@
export enum distributionTag {
DtPointSet,
DtSampleSet,
DtSymbolic,
PointSet = "PointSet",
SampleSet = "SampleSet",
Symbolic = "Symbolic",
}

View File

@ -12,55 +12,55 @@ type squiggleValue_Lambda = ForTS_SquiggleValue_Lambda.squiggleValue_Lambda //us
// Return values are kept as they are if they are JavaScript types.
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtArray_: string = "SvtArray"
external svtArray_: string = "Array"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtArrayString_: string = "SvtArrayString"
external svtArrayString_: string = "ArrayString"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtBool_: string = "SvtBool"
external svtBool_: string = "Bool"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtCall_: string = "SvtCall"
external svtCall_: string = "Call"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtDate_: string = "SvtDate"
external svtDate_: string = "Date"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtDeclaration_: string = "SvtDeclaration"
external svtDeclaration_: string = "Declaration"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtDistribution_: string = "SvtDistribution"
external svtDistribution_: string = "Distribution"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtLambda_: string = "SvtLambda"
external svtLambda_: string = "Lambda"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtModule_: string = "SvtModule"
external svtModule_: string = "Module"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtNumber_: string = "SvtNumber"
external svtNumber_: string = "Number"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtRecord_: string = "SvtRecord"
external svtRecord_: string = "Record"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtString_: string = "SvtString"
external svtString_: string = "String"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtSymbol_: string = "SvtSymbol"
external svtSymbol_: string = "Symbol"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtTimeDuration_: string = "SvtTimeDuration"
external svtTimeDuration_: string = "TimeDuration"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtType_: string = "SvtType"
external svtType_: string = "Type"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtTypeIdentifier_: string = "SvtUndefined"
external svtTypeIdentifier_: string = "TypeIdentifier"
@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag")
external svtVoid_: string = "SvtVoid"
external svtVoid_: string = "Void"
@genType.import("./ForTS_SquiggleValue_tag")
type squiggleValueTag

View File

@ -1,19 +1,19 @@
export enum squiggleValueTag {
SvtArray = "Array",
SvtArrayString = "ArrayString",
SvtBool = "Bool",
SvtCall = "Call",
SvtDate = "Date",
SvtDeclaration = "Declaration",
SvtDistribution = "Distribution",
SvtLambda = "Lambda",
SvtModule = "Module",
SvtNumber = "Number",
SvtRecord = "Record",
SvtString = "String",
SvtSymbol = "Symbol",
SvtTimeDuration = "TimeDuration",
SvtType = "Type",
SvtTypeIdentifier = "TypeIdentifier",
SvtVoid = "Void",
Array = "Array",
ArrayString = "ArrayString",
Bool = "Bool",
Call = "Call",
Date = "Date",
Declaration = "Declaration",
Distribution = "Distribution",
Lambda = "Lambda",
Module = "Module",
Number = "Number",
Record = "Record",
String = "String",
Symbol = "Symbol",
TimeDuration = "TimeDuration",
Type = "Type",
TypeIdentifier = "TypeIdentifier",
Void = "Void",
}