File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ namespace ts.refactor.extractSymbol {
283283
284284 // Walk up starting from the the start position until we find a non-SourceFile node that subsumes the selected span.
285285 // This may fail (e.g. you select two statements in the root of a source file)
286- const start = cursorRequest ? getExtractableParent ( startToken ) : getParentNodeInSpan ( startToken , sourceFile , adjustedSpan ) ;
286+ const start = cursorRequest ? getExtractableParent ( startToken ) : getParentNodeInSpan ( startToken , sourceFile , adjustedSpan ) ;
287287
288288 // Do the same for the ending position
289289 const end = cursorRequest ? start : getParentNodeInSpan ( endToken , sourceFile , adjustedSpan ) ;
@@ -299,7 +299,7 @@ namespace ts.refactor.extractSymbol {
299299 return { errors : [ createFileDiagnostic ( sourceFile , span . start , length , Messages . cannotExtractRange ) ] } ;
300300 }
301301
302- if ( isJSDoc ( start ) ) {
302+ if ( start . flags & NodeFlags . JSDoc ) {
303303 return { errors : [ createFileDiagnostic ( sourceFile , span . start , length , Messages . cannotExtractJSDoc ) ] } ;
304304 }
305305
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts' />
2+
3+ /////**
4+ //// * /*a*//*b*/
5+ //// * {@link Foo }
6+ //// */
7+
8+ goTo . select ( "a" , "b" ) ;
9+ verify . not . refactorAvailableForTriggerReason ( "invoked" , "Extract Symbol" ) ;
You can’t perform that action at this time.
0 commit comments