Closed
Description
I have the following code:
export function add(...args: Uint32Array): i32 {
return args.reduce((a, b) => a + b, 0)
}
I'm getting error "AS215: Optional parameter must have an initializer.":
When I try to add initializer:
export function add(...args = []: Uint32Array): i32 {
return args.reduce((a, b) => a + b, 0)
}
Then I'm getting error "TS1048: A rest parameter cannot have an initializer":
Originally posted by @jerrygreen in #377 (comment)