11import * as d from '../../../declarations' ;
2- import { getAttributeTypeInfo , isDecoratorNamed , isMethodWithDecorators , serializeSymbol } from './utils' ;
2+ import { getAttributeTypeInfo , isDecoratorNamed , isMethodWithDecorators , serializeSymbol , typeToString } from './utils' ;
33import { MEMBER_TYPE } from '../../../util/constants' ;
44import { validatePublicName } from './reserved-public-members' ;
55import ts from 'typescript' ;
@@ -19,7 +19,7 @@ export function getMethodDecoratorMeta(config: d.Config, diagnostics: d.Diagnost
1919 const methodName = member . name . getText ( ) ;
2020 const methodSignature = checker . getSignatureFromDeclaration ( member ) ;
2121
22- const flags = ts . TypeFormatFlags . WriteArrowStyleSignature ;
22+ const flags = ts . TypeFormatFlags . WriteArrowStyleSignature | ts . TypeFormatFlags . NoTruncation ;
2323 const returnType = checker . getReturnTypeOfSignature ( methodSignature ) ;
2424 const jsDocReturnTag = ts . getJSDocReturnTag ( member ) ;
2525 const typeString = checker . signatureToString (
@@ -61,7 +61,7 @@ export function getMethodDecoratorMeta(config: d.Config, diagnostics: d.Diagnost
6161 jsdoc : {
6262 ...serializeSymbol ( checker , symbol ) ,
6363 returns : {
64- type : checker . typeToString ( returnType ) ,
64+ type : typeToString ( checker , returnType ) ,
6565 documentation : jsDocReturnTag ? jsDocReturnTag . comment : ''
6666 } ,
6767 parameters : methodSignature . parameters . map ( parmSymbol =>
@@ -79,6 +79,6 @@ function isPromise(checker: ts.TypeChecker, type: ts.Type) {
7979 if ( type . isUnionOrIntersection ( ) ) {
8080 return false ;
8181 }
82- const typeText = checker . typeToString ( type ) ;
82+ const typeText = typeToString ( checker , type ) ;
8383 return typeText === 'void' || typeText . startsWith ( 'Promise<' ) ;
8484}
0 commit comments