diff --git a/packages/package.json b/packages/package.json index 94543c708f..c0aef1cc48 100644 --- a/packages/package.json +++ b/packages/package.json @@ -1,6 +1,6 @@ { "name": "@junyiacademy/perseus-core", - "version": "1.0.27", + "version": "1.0.28", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT", diff --git a/packages/perseus-editor/src/widgets/input-number-editor.tsx b/packages/perseus-editor/src/widgets/input-number-editor.tsx index 90e79423cc..b4035ccc93 100644 --- a/packages/perseus-editor/src/widgets/input-number-editor.tsx +++ b/packages/perseus-editor/src/widgets/input-number-editor.tsx @@ -56,7 +56,7 @@ type Props = { answerType: PropsFor["answerType"]; rightAlign: PropsFor["rightAlign"]; onChange: (arg1: { - value?: ParsedValue | 0; + value?: ParsedValue | number; simplify?: Props["simplify"]; size?: Props["size"]; inexact?: Props["inexact"]; diff --git a/packages/perseus/src/util.ts b/packages/perseus/src/util.ts index 07fe7b9990..526ac2691f 100644 --- a/packages/perseus/src/util.ts +++ b/packages/perseus/src/util.ts @@ -304,7 +304,9 @@ function keScoreFromPerseusScore( * Return the first valid interpretation of 'text' as a number, in the form * {value: 2.3, exact: true}. */ -function firstNumericalParse(text: string): ParsedValue | null | undefined { +function firstNumericalParse( + text: string, +): ParsedValue | null | undefined | number { // TODO(alpert): This is sort of hacky... let first; const val = KhanAnswerTypes.predicate.createValidatorFunctional(