@@ -55,30 +55,32 @@ const typeErrorCreate = unconstruct(TypeError);
5555/**
5656 * Creates a new function that calls the given function with a specified thisArg and arguments.
5757 *
58- * @param { (thisArg: any, ...args: any[]) => T } func - The function to be wrapped and called.
59- * @returns { (thisArg: any, ...args: any[]) => T } A new function that calls the given function with a specified thisArg and arguments.
58+ * @param func - The function to be wrapped and called.
59+ * @returns A new function that calls the given function with a specified thisArg and arguments.
6060 */
61- function unapply < T > ( func : ( thisArg : any , ...args : any [ ] ) => T ) {
61+ function unapply < T > (
62+ func : ( thisArg : any , ...args : any [ ] ) => T
63+ ) : ( thisArg : any , ...args : any [ ] ) => T {
6264 return ( thisArg : any , ...args : any [ ] ) : T => apply ( func , thisArg , args ) ;
6365}
6466
6567/**
6668 * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
6769 *
68- * @param { (...args: any[]) => T } func - The constructor function to be wrapped and called.
69- * @returns { (...args: any[]) => T } A new function that constructs an instance of the given constructor function with the provided arguments.
70+ * @param func - The constructor function to be wrapped and called.
71+ * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
7072 */
71- function unconstruct < T > ( func : ( ...args : any [ ] ) => T ) {
73+ function unconstruct < T > ( func : ( ...args : any [ ] ) => T ) : ( ... args : any [ ] ) => T {
7274 return ( ...args : any [ ] ) : T => construct ( func , args ) ;
7375}
7476
7577/**
7678 * Add properties to a lookup table
7779 *
78- * @param { Record<string, any> } set - The set to which elements will be added.
79- * @param { readonly any[] } array - The array containing elements to be added to the set.
80- * @param { ReturnType<typeof unapply<string>> } transformCaseFunc - An optional function to transform the case of each element before adding to the set.
81- * @returns { Record<string, any> } The modified set with added elements.
80+ * @param set - The set to which elements will be added.
81+ * @param array - The array containing elements to be added to the set.
82+ * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
83+ * @returns The modified set with added elements.
8284 */
8385function addToSet (
8486 set : Record < string , any > ,
@@ -116,8 +118,8 @@ function addToSet(
116118/**
117119 * Clean up an array to harden against CSPP
118120 *
119- * @param { T[] } array - The array to be cleaned.
120- * @returns { Array<T | null> } The cleaned version of the array
121+ * @param array - The array to be cleaned.
122+ * @returns The cleaned version of the array
121123 */
122124function cleanArray < T > ( array : T [ ] ) : Array < T | null > {
123125 for ( let index = 0 ; index < array . length ; index ++ ) {
@@ -134,8 +136,8 @@ function cleanArray<T>(array: T[]): Array<T | null> {
134136/**
135137 * Shallow clone an object
136138 *
137- * @param { T } object - The object to be cloned.
138- * @returns { T } A new object that copies the original.
139+ * @param object - The object to be cloned.
140+ * @returns A new object that copies the original.
139141 */
140142function clone < T extends Record < string , any > > ( object : T ) : T {
141143 const newObject = create ( null ) ;
@@ -164,9 +166,9 @@ function clone<T extends Record<string, any>>(object: T): T {
164166/**
165167 * This method automatically checks if the prop is function or getter and behaves accordingly.
166168 *
167- * @param { T } object - The object to look up the getter function in its prototype chain.
168- * @param { string } prop - The property name for which to find the getter function.
169- * @returns { ReturnType<typeof unapply<any>> | (() => null) } The getter function found in the prototype chain or a fallback function.
169+ * @param object - The object to look up the getter function in its prototype chain.
170+ * @param prop - The property name for which to find the getter function.
171+ * @returns The getter function found in the prototype chain or a fallback function.
170172 */
171173function lookupGetter < T extends Record < string , any > > (
172174 object : T ,
0 commit comments