File tree 2 files changed +11
-2
lines changed
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 {
283
283
284
284
// Walk up starting from the the start position until we find a non-SourceFile node that subsumes the selected span.
285
285
// 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 ) ;
287
287
288
288
// Do the same for the ending position
289
289
const end = cursorRequest ? start : getParentNodeInSpan ( endToken , sourceFile , adjustedSpan ) ;
@@ -299,7 +299,7 @@ namespace ts.refactor.extractSymbol {
299
299
return { errors : [ createFileDiagnostic ( sourceFile , span . start , length , Messages . cannotExtractRange ) ] } ;
300
300
}
301
301
302
- if ( isJSDoc ( start ) ) {
302
+ if ( start . flags & NodeFlags . JSDoc ) {
303
303
return { errors : [ createFileDiagnostic ( sourceFile , span . start , length , Messages . cannotExtractJSDoc ) ] } ;
304
304
}
305
305
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