mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-10 18:04:18 -05:00
fix(48540): Extract to typedef from (invalid) type with comments in JS file causes assertion failure (#48545)
* fix(48540): Remove comments from jsdoc union type expression * fix(48540) - Remove comment for top level import and add extract typedef tests * fix(48540) - Remove comments from jsdoc's descendant * fix(48540) - Using no nested comments instead of traversing
This commit is contained in:
@@ -229,6 +229,8 @@ namespace ts.refactor {
|
||||
function doTypedefChange(changes: textChanges.ChangeTracker, file: SourceFile, name: string, info: ExtractInfo) {
|
||||
const { firstStatement, selection, typeParameters } = info;
|
||||
|
||||
setEmitFlags(selection, EmitFlags.NoComments | EmitFlags.NoNestedComments);
|
||||
|
||||
const node = factory.createJSDocTypedefTag(
|
||||
factory.createIdentifier("typedef"),
|
||||
factory.createJSDocTypeExpression(selection),
|
||||
|
||||
Reference in New Issue
Block a user