Skip to content

Commit 93b549b

Browse files
committed
Update the YAML generator to support the @eventproperty tag
1 parent b7eaed8 commit 93b549b

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

apps/api-documenter/src/yaml/IYamlApiFile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface IYamlException {
2727
* Part of the IYamlApiFile structure. Represents the type of an IYamlItem.
2828
*/
2929
export type YamlTypeId = 'class' | 'constructor' | 'enum' | 'field' | 'function' | 'interface'
30-
| 'method' | 'package' | 'property';
30+
| 'method' | 'package' | 'property' | 'event';
3131

3232
/**
3333
* Part of the IYamlApiFile structure. Represents basic API elements such as

apps/api-documenter/src/yaml/YamlDocumenter.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,11 @@ export class YamlDocumenter {
283283
this._populateYamlMethod(yamlItem, docItem);
284284
break;
285285
case DocItemKind.Property:
286-
yamlItem.type = 'property';
286+
if ((docItem.apiItem as IApiProperty).isEventProperty) {
287+
yamlItem.type = 'event';
288+
} else {
289+
yamlItem.type = 'property';
290+
}
287291
this._populateYamlProperty(yamlItem, docItem);
288292
break;
289293
case DocItemKind.Function:

apps/api-documenter/src/yaml/typescript.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"$ref": "#/definitions/syntax"
130130
},
131131
"type": {
132-
"enum": [ "class", "constructor", "enum", "field", "function", "interface", "method", "package", "property" ]
132+
"enum": [ "class", "constructor", "enum", "field", "function", "interface", "method", "package", "property", "event" ]
133133
},
134134
"uid": {
135135
"type": "string",

0 commit comments

Comments
 (0)