File tree 2 files changed +16
-1
lines changed 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ namespace ts.GoToDefinition {
241
241
function getConstructSignatureDefinition ( ) : DefinitionInfo [ ] | undefined {
242
242
// Applicable only if we are in a new expression, or we are on a constructor declaration
243
243
// and in either case the symbol has a construct signature definition, i.e. class
244
- if ( symbol . flags & SymbolFlags . Class && ( isNewExpressionTarget ( node ) || node . kind === SyntaxKind . ConstructorKeyword ) ) {
244
+ if ( symbol . flags & SymbolFlags . Class && ! ( symbol . flags & SymbolFlags . Function ) && ( isNewExpressionTarget ( node ) || node . kind === SyntaxKind . ConstructorKeyword ) ) {
245
245
const cls = find ( filteredDeclarations , isClassLike ) || Debug . fail ( "Expected declaration to have at least one class-like declaration" ) ;
246
246
return getSignatureDefinition ( cls . members , /*selectConstructors*/ true ) ;
247
247
}
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts" />
2
+ // @allowJs : true
3
+ // @checkJs : true
4
+ // @noEmit : true
5
+ // @filename : gotoDefinitionConstructorFunction.js
6
+ //// function /*end*/StringStreamm() {
7
+ //// }
8
+ //// StringStreamm.prototype = {
9
+ //// };
10
+ ////
11
+ //// function runMode () {
12
+ //// new [|/*start*/StringStreamm|]()
13
+ //// };
14
+
15
+ verify . goToDefinition ( 'start' , 'end' )
You can’t perform that action at this time.
0 commit comments