@@ -40,8 +40,8 @@ export function scale2d(sx, sy) {
4040 * Create a composition function that returns a function that combines two
4141 * functions to perform a repeatable transformation
4242 *
43- * @param {function } f the first function to apply
44- * @param {function } g the second function to apply
43+ * @param {CallbackType } f the first function to apply
44+ * @param {CallbackType } g the second function to apply
4545 *
4646 * @returns {CallbackType } a function which takes an x, y parameter, returns the
4747 * transformed coordinate pair in the form [x, y]
@@ -54,11 +54,12 @@ export function composeTransform(f, g) {
5454 * Return a function that memoizes the last result. If the arguments are the same as the last call,
5555 * then memoized result returned.
5656 *
57- * @param {function } f the transformation function to memoize, assumes takes two arguments 'x' and 'y'
57+ * @param {CallbackType } f the transformation function to memoize, assumes takes two arguments 'x' and 'y'
5858 *
5959 * @returns {CallbackType } a function which takes x and y arguments, and will either return the saved result
6060 * if the arguments are the same on subsequent calls, or compute a new result if they are different.
6161 */
6262export function memoizeTransform ( f ) {
63+ // if you have type error for callback function. Add `/** @type {[number, number] } */` to the return variable.
6364 throw new Error ( 'Remove this line and implement the function' ) ;
6465}
0 commit comments