Skip to content

Commit

Permalink
fixup! refactor(compiler): replace most usages of getMutableClone
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbeto committed Aug 19, 2022
1 parent 12b4a85 commit e025da2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class TypeEmitter {
} else if (ts.isRegularExpressionLiteral(node)) {
clone = ts.factory.createRegularExpressionLiteral(node.text);
} else {
throw new Error(`Unsupported literal kind ${node.kind}`);
throw new Error(`Unsupported literal kind ${ts.SyntaxKind[node.kind]}`);
}

ts.setTextRange(clone, {pos: -1, end: -1});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ function cloneClassElementWithModifiers(
} else if (ts.isSetAccessor(node)) {
clone = createSetAccessorDeclaration(modifiers, node.name, node.parameters, node.body);
} else {
throw new Error(`Unsupported decorated member with kind ${node.kind}`);
throw new Error(`Unsupported decorated member with kind ${ts.SyntaxKind[node.kind]}`);
}

return ts.setOriginalNode(clone, node);
Expand Down

0 comments on commit e025da2

Please sign in to comment.