@@ -26,7 +26,8 @@ import {
2626 ApiPropertySignature ,
2727 ApiItemContainerMixin ,
2828 ApiPackage ,
29- ApiFunctionLikeMixin
29+ ApiFunctionLikeMixin ,
30+ ApiEnumMember
3031} from '@microsoft/api-extractor' ;
3132
3233import {
@@ -296,16 +297,12 @@ export class YamlDocumenter {
296297 break ;
297298 case ApiItemKind . EnumMember :
298299 yamlItem . type = 'field' ;
299- /*
300300 const enumMember : ApiEnumMember = apiItem as ApiEnumMember ;
301- if (enumMember.value) {
302- // NOTE: In TypeScript, enum members can be strings or integers.
303- // If it is an integer, then enumMember.value will be a string representation of the integer.
304- // If it is a string, then enumMember.value will include the quotation marks.
305- // Enum values can also be calculated numbers, however this is not implemented yet.
306- yamlItem.numericValue = enumMember.value as any; // tslint:disable-line:no-any
301+
302+ if ( enumMember . initializerExcerpt . text . length > 0 ) {
303+ yamlItem . numericValue = enumMember . initializerExcerpt . text ;
307304 }
308- */
305+
309306 break ;
310307 case ApiItemKind . Class :
311308 yamlItem . type = 'class' ;
@@ -316,6 +313,7 @@ export class YamlDocumenter {
316313 this . _populateYamlClassOrInterface ( yamlItem , apiItem ) ;
317314 break ;
318315 case ApiItemKind . Method :
316+ case ApiItemKind . MethodSignature :
319317 yamlItem . type = 'method' ;
320318 this . _populateYamlFunctionLike ( yamlItem , apiItem as ApiMethod ) ;
321319 break ;
@@ -329,6 +327,7 @@ export class YamlDocumenter {
329327 yamlItem . type = 'package' ;
330328 break ;
331329 case ApiItemKind . Property :
330+ case ApiItemKind . PropertySignature :
332331 const apiProperty : ApiPropertyItem = apiItem as ApiPropertyItem ;
333332 if ( apiProperty . isEventProperty ) {
334333 yamlItem . type = 'event' ;
0 commit comments