@@ -59,8 +59,10 @@ const validateAliasConflicts = (schema: OptionsSchema): void => {
5959 *
6060 * - First arg in pipe: used directly as a Parser
6161 * - Later arg in pipe: called as function to merge with incoming Parser
62+ *
63+ * @knipignore
6264 */
63- type CallableOptionsParser < V > = ( < V2 , P2 extends readonly unknown [ ] > (
65+ export type CallableOptionsParser < V > = ( < V2 , P2 extends readonly unknown [ ] > (
6466 parser : Parser < V2 , P2 > ,
6567) => Parser < V & V2 , P2 > ) &
6668 Parser < V , readonly [ ] > ;
@@ -290,21 +292,16 @@ export const opt = {
290292 * - Later arg in pipe: called as function to merge with incoming Parser
291293 *
292294 * For positionals, we DON'T intersect values - we just pass through V2.
295+ *
296+ * @knipignore
293297 */
294- type CallablePositionalsParser < P extends readonly unknown [ ] > = ( <
298+ export type CallablePositionalsParser < P extends readonly unknown [ ] > = ( <
295299 V2 ,
296300 P2 extends readonly unknown [ ] ,
297301> (
298302 parser : Parser < V2 , P2 > ,
299303) => Parser < V2 , readonly [ ...P2 , ...P ] > ) &
300- Parser < EmptyObject , P > ;
301-
302- /**
303- * Empty object type that works better with intersections than Record<string,
304- * never>. {} & T = T, but Record<string, never> & T can be problematic.
305- */
306- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
307- type EmptyObject = { } ;
304+ Parser < object , P > ;
308305
309306/**
310307 * Create a Parser from positional definitions that can also merge with existing
@@ -341,12 +338,12 @@ const positionalsImpl = <T extends PositionalsSchema>(
341338
342339 // Add Parser properties to the function
343340 // Use empty object {} instead of Record<string, never> for better intersection behavior
344- const parserProps : Parser < EmptyObject , InferPositionals < T > > = {
341+ const parserProps : Parser < object , InferPositionals < T > > = {
345342 __brand : 'Parser' ,
346343 __optionsSchema : { } ,
347344 __positionals : [ ] as unknown as InferPositionals < T > ,
348345 __positionalsSchema : positionals ,
349- __values : { } as EmptyObject ,
346+ __values : { } ,
350347 } ;
351348
352349 return Object . assign ( merger , parserProps ) as CallablePositionalsParser <
0 commit comments