File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /// <reference path="types .ts" />
1+ /// <reference path="core .ts" />
22
33module ts {
44 export interface ReferencePathMatchResult {
@@ -575,6 +575,17 @@ module ts {
575575 return ( < CallExpression > node ) . expression ;
576576 }
577577
578+ function getConstructorWithBody ( member : ClassElement ) : ConstructorDeclaration {
579+ if ( member . kind === SyntaxKind . Constructor && nodeIsPresent ( ( < ConstructorDeclaration > member ) . body ) ) {
580+ return < ConstructorDeclaration > member ;
581+ }
582+ return undefined ;
583+ }
584+
585+ export function getFirstConstructorWithBody ( node : ClassDeclaration ) : ConstructorDeclaration {
586+ return forEach ( node . members , getConstructorWithBody ) ;
587+ }
588+
578589 export function isExpression ( node : Node ) : boolean {
579590 switch ( node . kind ) {
580591 case SyntaxKind . ThisKeyword :
You can’t perform that action at this time.
0 commit comments