From 23bc41d61c754fd2b1bf9f114d95c3be6a3de7cf Mon Sep 17 00:00:00 2001 From: Sam Nolan Date: Tue, 31 May 2022 04:16:04 +0000 Subject: [PATCH] Change import to import type when needed --- packages/squiggle-lang/src/js/index.ts | 24 ++++++++----------- .../squiggle-lang/src/js/rescript_interop.ts | 2 +- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/packages/squiggle-lang/src/js/index.ts b/packages/squiggle-lang/src/js/index.ts index 03068a51..30ca5203 100644 --- a/packages/squiggle-lang/src/js/index.ts +++ b/packages/squiggle-lang/src/js/index.ts @@ -1,18 +1,22 @@ import * as _ from "lodash"; -import { +import type { environment, + expressionValue, + externalBindings, + errorValue, +} from "../rescript/TypescriptInterface.gen"; +import { defaultEnvironment, evaluatePartialUsingExternalBindings, evaluateUsingOptions, - externalBindings, - expressionValue, - errorValue, foreignFunctionInterface, } from "../rescript/TypescriptInterface.gen"; export { makeSampleSetDist, errorValueToString, distributionErrorToString, +} from "../rescript/TypescriptInterface.gen"; +export type { distributionError, declarationArg, declaration, @@ -30,16 +34,8 @@ import { import { result, resultMap, tag, tagged } from "./types"; import { Distribution, shape } from "./distribution"; -export { - Distribution, - squiggleExpression, - result, - resultMap, - shape, - lambdaValue, - environment, - defaultEnvironment, -}; +export { Distribution, resultMap, defaultEnvironment }; +export type { result, shape, environment, lambdaValue, squiggleExpression }; export let defaultSamplingInputs: environment = { sampleCount: 10000, diff --git a/packages/squiggle-lang/src/js/rescript_interop.ts b/packages/squiggle-lang/src/js/rescript_interop.ts index 9f9bdb39..002d1dee 100644 --- a/packages/squiggle-lang/src/js/rescript_interop.ts +++ b/packages/squiggle-lang/src/js/rescript_interop.ts @@ -1,5 +1,5 @@ import * as _ from "lodash"; -import { +import type { expressionValue, mixedShape, sampleSetDist,