Fix build errors for components and lang

This commit is contained in:
Sam Nolan 2022-04-12 16:21:32 +10:00
parent 21458227ce
commit e5f8b6c7d3
4 changed files with 8 additions and 3 deletions

View File

@ -31,7 +31,7 @@
"scripts": {
"start": "cross-env REACT_APP_FAST_REFRESH=false && start-storybook -p 6006 -s public",
"build": "tsc -b && build-storybook -s public",
"bundle": "webpack",
"bundle": "tsc -b && webpack",
"all": "yarn bundle && yarn build"
},
"eslintConfig": {

View File

@ -10,7 +10,6 @@ module.exports = {
{
test: /\.tsx?$/,
loader: "ts-loader",
include: path.resolve(__dirname, "src"),
options: { projectReferences: true, transpileOnly: true },
exclude: /node_modules/,
},

View File

@ -3,6 +3,7 @@ import {
Distribution,
resultMap,
squiggleExpression,
errorValueToString,
} from "../src/js/index";
let testRun = (x: string): squiggleExpression => {
@ -10,6 +11,11 @@ let testRun = (x: string): squiggleExpression => {
expect(result.tag).toEqual("Ok");
if (result.tag === "Ok") {
return result.value;
} else {
throw Error(
"Expected squiggle expression to evaluate but got error: " +
errorValueToString(result.value)
);
}
};

View File

@ -192,7 +192,7 @@ export class Distribution {
);
}
shape(): result<shape, distributionError> {
pointSet(): result<shape, distributionError> {
let pointSet = toPointSet(
this.t,
{