We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00e330b commit 9c9b13fCopy full SHA for 9c9b13f
dictionary/parser.ts
@@ -295,8 +295,8 @@ const prepositionDefinition = checkedSimpleUnitWithTemplate(
295
const numeralDefinition = checkedSimpleUnit("num")
296
.mapWithPositionedError((num) => {
297
const numeral = +num;
298
- if (!Number.isInteger(numeral)) {
299
- throw `"${num}" is not a number`;
+ if (!Number.isInteger(numeral) || numeral < 0) {
+ throw `"${num}" is not a non-negative integer`;
300
} else {
301
return { type: "numeral", numeral };
302
}
0 commit comments