@@ -6,7 +6,7 @@ import { ApiItem, ApiItemOptions } from "./abstractions/api-item";
66
77import { ApiItemReference } from "./contracts/api-item-reference" ;
88import { AccessModifier } from "./contracts/access-modifier" ;
9- import { TSHelpers } from "./ts-helpers" ;
9+ import { TsHelpers } from "./ts-helpers" ;
1010import { Logger } from "./utils/logger" ;
1111import { ApiItemLocationDto } from "./contracts/api-item-location-dto" ;
1212
@@ -35,7 +35,7 @@ import { ApiCall } from "./definitions/api-call";
3535import { ApiConstruct } from "./definitions/api-construct" ;
3636import { ApiTypeParameter } from "./definitions/api-type-parameter" ;
3737import { ApiTypeLiteral } from "./definitions/api-type-literal" ;
38- import { ApiFunctionType } from "./definitions/api-function-type " ;
38+ import { ApiFunctionExpression } from "./definitions/api-function-expression " ;
3939import { ApiMapped } from "./definitions/api-mapped" ;
4040import { PathIsInside } from "./utils/path-is-inside" ;
4141
@@ -97,7 +97,7 @@ export namespace ApiHelpers {
9797 } else if ( ts . isTypeLiteralNode ( declaration ) || ts . isObjectLiteralExpression ( declaration ) ) {
9898 apiItem = new ApiTypeLiteral ( declaration , symbol , options ) ;
9999 } else if ( ts . isFunctionTypeNode ( declaration ) || ts . isArrowFunction ( declaration ) || ts . isFunctionExpression ( declaration ) ) {
100- apiItem = new ApiFunctionType ( declaration , symbol , options ) ;
100+ apiItem = new ApiFunctionExpression ( declaration , symbol , options ) ;
101101 } else if ( ts . isMappedTypeNode ( declaration ) ) {
102102 apiItem = new ApiMapped ( declaration , symbol , options ) ;
103103 }
@@ -147,7 +147,7 @@ export namespace ApiHelpers {
147147 return options . Registry . GetDeclarationId ( declaration ) ;
148148 }
149149
150- const resolveRealSymbol = TSHelpers . FollowSymbolAliases ( symbol , options . Program . getTypeChecker ( ) ) ;
150+ const resolveRealSymbol = TsHelpers . FollowSymbolAliases ( symbol , options . Program . getTypeChecker ( ) ) ;
151151 const apiItem = VisitApiItem ( declaration , resolveRealSymbol , options ) ;
152152 if ( apiItem == null ) {
153153 return undefined ;
@@ -212,7 +212,7 @@ export namespace ApiHelpers {
212212 const typeChecker = options . Program . getTypeChecker ( ) ;
213213
214214 declarations . forEach ( declaration => {
215- const symbol = TSHelpers . GetSymbolFromDeclaration ( declaration , typeChecker ) ;
215+ const symbol = TsHelpers . GetSymbolFromDeclaration ( declaration , typeChecker ) ;
216216 if ( symbol == null ) {
217217 return ;
218218 }
@@ -277,6 +277,11 @@ export namespace ApiHelpers {
277277 Logger . Log ( logLevel , `${ linePrefix } : ${ message } ` ) ;
278278 }
279279
280+ export function LogWithLocation ( logLevel : LogLevel , location : ApiItemLocationDto , message : string ) : void {
281+ const linePrefix = `${ location . FileName } (${ location . Line + 1 } ,${ location . Character + 1 } )` ;
282+ Logger . Log ( logLevel , `${ linePrefix } : ${ message } ` ) ;
283+ }
284+
280285 export function StandardizeRelativePath ( location : string , options : ApiItemOptions ) : string {
281286 const workingSep = options . ExtractorOptions . OutputPathSeparator ;
282287 const fixedLocation = location . split ( path . sep ) . join ( workingSep ) ;
@@ -326,7 +331,7 @@ export namespace ApiHelpers {
326331 return undefined ;
327332 }
328333
329- const parentSymbol = TSHelpers . GetSymbolFromDeclaration ( parentDeclaration , options . Program . getTypeChecker ( ) ) ;
334+ const parentSymbol = TsHelpers . GetSymbolFromDeclaration ( parentDeclaration , options . Program . getTypeChecker ( ) ) ;
330335 if ( parentSymbol == null ) {
331336 return undefined ;
332337 }
0 commit comments