[javascript] Set type for function parameters?