Skip to content

Commit 86a90df

Browse files
author
Joseph Watts
committed
Fix parameter property tests
Signed-off-by: Joseph Watts <[email protected]>
1 parent 7154908 commit 86a90df

File tree

1 file changed

+4
-2
lines changed
  • src/compiler/transformers

1 file changed

+4
-2
lines changed

src/compiler/transformers/ts.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1072,8 +1072,10 @@ namespace ts {
10721072
* @param node The parameter declaration.
10731073
*/
10741074
function transformParameterWithPropertyAssignment(node: ParameterPropertyDeclaration) {
1075-
Debug.assert(isIdentifier(node.name));
1076-
const name = node.name as Identifier;
1075+
const name = node.name;
1076+
if (!isIdentifier(name)) {
1077+
return undefined;
1078+
}
10771079
const propertyName = getMutableClone(name);
10781080
setEmitFlags(propertyName, EmitFlags.NoComments | EmitFlags.NoSourceMap);
10791081

0 commit comments

Comments
 (0)