mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-13 09:12:52 -05:00
Fix transform crash with destructured parameter property (#63043)
This commit is contained in:
@@ -1055,6 +1055,10 @@ export function transformTypeScript(context: TransformationContext): Transformer
|
||||
|
||||
if (parametersWithPropertyAssignments) {
|
||||
for (const parameter of parametersWithPropertyAssignments) {
|
||||
// Ignore parameter properties with destructured names; we will have errored on them earlier.
|
||||
if (!isIdentifier(parameter.name)) {
|
||||
continue;
|
||||
}
|
||||
const parameterProperty = factory.createPropertyDeclaration(
|
||||
/*modifiers*/ undefined,
|
||||
parameter.name,
|
||||
|
||||
Reference in New Issue
Block a user