From 2de71d1c018761b691ff181c518eb4e151350ab8 Mon Sep 17 00:00:00 2001 From: Nicolas DUBIEN Date: Wed, 11 Dec 2019 01:19:08 +0100 Subject: [PATCH] Remove unneeded `@param` jsdoc annotations for tuple and property --- prebuild/helpers.ts | 14 ++++++-------- prebuild/property.ts | 3 +-- prebuild/tuple.ts | 3 +-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/prebuild/helpers.ts b/prebuild/helpers.ts index 2b40cb9d5b9..b5c87bd5e92 100644 --- a/prebuild/helpers.ts +++ b/prebuild/helpers.ts @@ -1,12 +1,10 @@ -const iota = (num: number) => [...Array(num)].map((v, idx) => idx); -const joiner = (num: number, fn: (v: number) => string, ch: string) => +export const iota = (num: number) => [...Array(num)].map((v, idx) => idx); +export const joiner = (num: number, fn: (v: number) => string, ch: string) => iota(num) .map(fn) .join(ch); -const commas = (num: number, fn: (v: number) => string) => joiner(num, fn, ','); +export const commas = (num: number, fn: (v: number) => string) => joiner(num, fn, ','); -const arbCommas = (num: number) => commas(num, v => `arb${v}`); // arb0,arb1,... -const txCommas = (num: number) => commas(num, v => `T${v}`); // T0,T1,... -const txXor = (num: number) => joiner(num, v => `T${v}`, '|'); // T0|T1|... - -export { iota, joiner, commas, arbCommas, txCommas, txXor }; +export const arbCommas = (num: number) => commas(num, v => `arb${v}`); // arb0,arb1,... +export const txCommas = (num: number) => commas(num, v => `T${v}`); // T0,T1,... +export const txXor = (num: number) => joiner(num, v => `T${v}`, '|'); // T0|T1|... diff --git a/prebuild/property.ts b/prebuild/property.ts index 01bae446a7a..d51350dd043 100644 --- a/prebuild/property.ts +++ b/prebuild/property.ts @@ -1,4 +1,4 @@ -import { commas, iota, joiner, txCommas } from './helpers'; +import { commas, iota, txCommas } from './helpers'; const predicateFor = (num: number, isAsync: boolean): string => isAsync @@ -11,7 +11,6 @@ const signatureFor = (num: number, isAsync: boolean): string => { return ` /** * Instantiate a new {@link ${className}} - * ${joiner(num, v => `@param arb${v} Generate the parameter at position #${v + 1} of predicate`, '\n* ')} * @param predicate Assess the success of the property. Would be considered falsy if its throws or if its output evaluates to false */ function ${functionName}<${txCommas(num)}>( diff --git a/prebuild/tuple.ts b/prebuild/tuple.ts index 4729dc9b375..1ab2f2b891c 100644 --- a/prebuild/tuple.ts +++ b/prebuild/tuple.ts @@ -1,10 +1,9 @@ -import { commas, iota, joiner, txCommas } from './helpers'; +import { commas, iota, txCommas } from './helpers'; const signatureFor = (num: number, opt?: boolean): string => ` /** * For tuples of [${txCommas(num)}] - * ${joiner(num, v => `@param arb${v} Arbitrary responsible for T${v}`, '\n* ')} */ function tuple<${txCommas(num)}>( ${commas(num, v => `arb${v}${opt === true ? '?' : ''}: Arbitrary`)}