At the moment, the orderPrice(pizzaOrders) function to implement isn’t really clear because we have no idea about what is PizzaOrder pass in parameters.
@param {PizzaOrder[]} pizzaOrders a list of pizza orders
Proposal:
We could help the developper to provide more information inside js docs :
* @typedef PizzaOrder
* @type {object}
* @property {string} pizza - the name of the pizza.
* @property {string[]} extras - the name of extras ingredients of the pizza.
@param {PizzaOrder[]} pizzaOrders a list of pizza orders
Precise the PizzaOrder inside the instruction of the task’s exercise
What do you think about that ?
Expected:
Give more information about the developper of what is PizzaOrder
I agree. I had to look at the test to see how it was defined.
I was also initially confused about the JSDoc string for the first function. Pizza and Extras are not defined anywhere. These should have just been strings:
/**
Determine the prize of the pizza given the pizza and optional extras
@param {string} pizza name of the pizza to be made
They should not have been strings, because what can be passed in is clearly defined here.
I think what we can do best is expose global.d.ts for this exercise to the user as read-only file. This can be accomplished by updating config.json for that exercise and adding the editor key as described in the contribution docs.