Skip to content

Commit

Permalink
Bail on rest parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
masaeedu committed Aug 10, 2017
1 parent db39b43 commit 6095dfd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12806,9 +12806,7 @@ namespace ts {

function getParameterTypeFromBody(parameter: ParameterDeclaration): Type {
const func = <FunctionLikeDeclaration>parameter.parent
if (!func.body) {
return unknownType;
}
if (!func.body || isRestParameter(parameter)) return

let type: Type;
let types: Type[];
Expand Down

0 comments on commit 6095dfd

Please sign in to comment.