This completes the work that started in PR #33069, and fixes #32835. There are probably two additional related changes that are needed to make this more complete: * Fix the code that composes the error message (see the first two `FIXME`s in `callWithSpread3.ts`). * Fix the code that checks the argument types (second two `FIXME`s). * There is also an error in `genericRestParameters1.ts` which changed but should not be an error in the first place. Added a `FIXME` there too. (Probably will work if the previous iterm is done.) In addition, `getEffectiveCallArguments` munges the arguments in case of a spread in the last argument which might be better to avoid. (I think that there are cases where it wouldn't work anyway, such as a spread of an array followed by a spread of an empty array.) |
||
---|---|---|
.. | ||
genericObjectRest.ts | ||
genericRestArity.ts | ||
genericRestArityStrict.ts | ||
genericRestParameters1.ts | ||
genericRestParameters2.ts | ||
genericRestParameters3.ts | ||
objectRest.ts | ||
objectRest2.ts | ||
objectRestAssignment.ts | ||
objectRestCatchES5.ts | ||
objectRestForOf.ts | ||
objectRestNegative.ts | ||
objectRestParameter.ts | ||
objectRestParameterES5.ts | ||
objectRestPropertyMustBeLast.ts | ||
objectRestReadonly.ts | ||
restElementMustBeLast.ts | ||
restTuplesFromContextualTypes.ts |