diff --git a/packages/xpath/src/evaluator/functions/FunctionImplementation.ts b/packages/xpath/src/evaluator/functions/FunctionImplementation.ts index 9017192e7..edda22441 100644 --- a/packages/xpath/src/evaluator/functions/FunctionImplementation.ts +++ b/packages/xpath/src/evaluator/functions/FunctionImplementation.ts @@ -39,7 +39,7 @@ export class InvalidArgumentError extends Error { } } -export type ParameterArityType = 'optional' | 'required' | 'variadic' | 'variadic+'; +export type ParameterArityType = 'optional' | 'required' | 'variadic'; export type ParameterTypeHint = // | 'lazy' // TODO: it might be good to *explicitly* mark certain parameters @@ -125,12 +125,6 @@ export class FunctionImplementation { max: Infinity, }; - case 'variadic+': - return { - min: acc.min + 1, - max: Infinity, - }; - default: throw new UnreachableError(arityType); } diff --git a/packages/xpath/src/functions/xforms/geo.ts b/packages/xpath/src/functions/xforms/geo.ts index 81b0df981..37e59556b 100644 --- a/packages/xpath/src/functions/xforms/geo.ts +++ b/packages/xpath/src/functions/xforms/geo.ts @@ -208,7 +208,7 @@ const sum = (values: readonly number[]) => { export const distance = new NumberFunction( 'distance', - [{ arityType: 'variadic+' }], + [{ arityType: 'required' }, { arityType: 'variadic' }], (context, args) => { const lines = evaluateLines(context, args);