@microsoft/api-extractor 7.29.5 → 7.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/rollup.d.ts +26 -2
  2. package/lib/analyzer/AstNamespaceImport.d.ts +5 -0
  3. package/lib/analyzer/AstNamespaceImport.d.ts.map +1 -1
  4. package/lib/analyzer/AstNamespaceImport.js +1 -0
  5. package/lib/analyzer/AstNamespaceImport.js.map +1 -1
  6. package/lib/analyzer/ExportAnalyzer.d.ts.map +1 -1
  7. package/lib/analyzer/ExportAnalyzer.js +2 -1
  8. package/lib/analyzer/ExportAnalyzer.js.map +1 -1
  9. package/lib/api/ExtractorConfig.d.ts +4 -0
  10. package/lib/api/ExtractorConfig.d.ts.map +1 -1
  11. package/lib/api/ExtractorConfig.js +8 -0
  12. package/lib/api/ExtractorConfig.js.map +1 -1
  13. package/lib/api/ExtractorMessageId.d.ts +1 -1
  14. package/lib/api/ExtractorMessageId.js.map +1 -1
  15. package/lib/api/IConfigFile.d.ts +21 -1
  16. package/lib/api/IConfigFile.d.ts.map +1 -1
  17. package/lib/api/IConfigFile.js.map +1 -1
  18. package/lib/collector/Collector.d.ts +7 -1
  19. package/lib/collector/Collector.d.ts.map +1 -1
  20. package/lib/collector/Collector.js +57 -32
  21. package/lib/collector/Collector.js.map +1 -1
  22. package/lib/collector/CollectorEntity.d.ts +60 -27
  23. package/lib/collector/CollectorEntity.d.ts.map +1 -1
  24. package/lib/collector/CollectorEntity.js +91 -28
  25. package/lib/collector/CollectorEntity.js.map +1 -1
  26. package/lib/enhancers/DocCommentEnhancer.d.ts.map +1 -1
  27. package/lib/enhancers/DocCommentEnhancer.js +3 -1
  28. package/lib/enhancers/DocCommentEnhancer.js.map +1 -1
  29. package/lib/enhancers/ValidationEnhancer.d.ts.map +1 -1
  30. package/lib/enhancers/ValidationEnhancer.js +7 -5
  31. package/lib/enhancers/ValidationEnhancer.js.map +1 -1
  32. package/lib/generators/ApiModelGenerator.d.ts +1 -1
  33. package/lib/generators/ApiModelGenerator.d.ts.map +1 -1
  34. package/lib/generators/ApiModelGenerator.js +100 -75
  35. package/lib/generators/ApiModelGenerator.js.map +1 -1
  36. package/lib/generators/ApiReportGenerator.js +2 -2
  37. package/lib/generators/ApiReportGenerator.js.map +1 -1
  38. package/lib/generators/DeclarationReferenceGenerator.d.ts +4 -8
  39. package/lib/generators/DeclarationReferenceGenerator.d.ts.map +1 -1
  40. package/lib/generators/DeclarationReferenceGenerator.js +77 -70
  41. package/lib/generators/DeclarationReferenceGenerator.js.map +1 -1
  42. package/lib/schemas/api-extractor-defaults.json +4 -2
  43. package/lib/schemas/api-extractor-template.json +24 -5
  44. package/lib/schemas/api-extractor.schema.json +11 -1
  45. package/package.json +3 -4
@@ -38,7 +38,7 @@ class ApiModelGenerator {
38
38
  constructor(collector) {
39
39
  this._collector = collector;
40
40
  this._apiModel = new api_extractor_model_1.ApiModel();
41
- this._referenceGenerator = new DeclarationReferenceGenerator_1.DeclarationReferenceGenerator(collector.packageJsonLookup, collector.workingPackage.name, collector.program, collector.typeChecker, collector.bundledPackageNames);
41
+ this._referenceGenerator = new DeclarationReferenceGenerator_1.DeclarationReferenceGenerator(collector);
42
42
  }
43
43
  get apiModel() {
44
44
  return this._apiModel;
@@ -53,19 +53,25 @@ class ApiModelGenerator {
53
53
  this._apiModel.addMember(apiPackage);
54
54
  const apiEntryPoint = new api_extractor_model_1.ApiEntryPoint({ name: '' });
55
55
  apiPackage.addMember(apiEntryPoint);
56
- // Create a CollectorEntity for each top-level export
57
56
  for (const entity of this._collector.entities) {
58
- if (entity.exported) {
59
- this._processAstEntity(entity.astEntity, entity.nameForEmit, apiEntryPoint);
57
+ // Only process entities that are exported from the entry point. Entities that are exported from
58
+ // `AstNamespaceImport` entities will be processed by `_processAstNamespaceImport`. However, if
59
+ // we are including forgotten exports, then process everything.
60
+ if (entity.exportedFromEntryPoint || this._collector.extractorConfig.docModelIncludeForgottenExports) {
61
+ this._processAstEntity(entity.astEntity, {
62
+ name: entity.nameForEmit,
63
+ isExported: entity.exportedFromEntryPoint,
64
+ parentApiItem: apiEntryPoint
65
+ });
60
66
  }
61
67
  }
62
68
  return apiPackage;
63
69
  }
64
- _processAstEntity(astEntity, exportedName, parentApiItem) {
70
+ _processAstEntity(astEntity, context) {
65
71
  if (astEntity instanceof AstSymbol_1.AstSymbol) {
66
72
  // Skip ancillary declarations; we will process them with the main declaration
67
73
  for (const astDeclaration of this._collector.getNonAncillaryDeclarations(astEntity)) {
68
- this._processDeclaration(astDeclaration, exportedName, parentApiItem);
74
+ this._processDeclaration(astDeclaration, context);
69
75
  }
70
76
  return;
71
77
  }
@@ -80,19 +86,20 @@ class ApiModelGenerator {
80
86
  // export { example1, example2 }
81
87
  //
82
88
  // The current logic does not try to associate "thing()" with a specific parent. Instead
83
- // the API documentation will show duplicated entries for example1.thing() and example2.thing()./
89
+ // the API documentation will show duplicated entries for example1.thing() and example2.thing().
84
90
  //
85
91
  // This could be improved in the future, but it requires a stable mechanism for choosing an associated parent.
86
92
  // For thoughts about this: https://github.com/microsoft/rushstack/issues/1308
87
- this._processAstModule(astEntity.astModule, exportedName, parentApiItem);
93
+ this._processAstNamespaceImport(astEntity, context);
88
94
  return;
89
95
  }
90
96
  // TODO: Figure out how to represent reexported AstImport objects. Basically we need to introduce a new
91
97
  // ApiItem subclass for "export alias", similar to a type alias, but representing declarations of the
92
98
  // form "export { X } from 'external-package'". We can also use this to solve GitHub issue #950.
93
99
  }
94
- _processAstModule(astModule, exportedName, parentApiItem) {
95
- const name = exportedName ? exportedName : astModule.moduleSymbol.name;
100
+ _processAstNamespaceImport(astNamespaceImport, context) {
101
+ const astModule = astNamespaceImport.astModule;
102
+ const { name, isExported, parentApiItem } = context;
96
103
  const containerKey = api_extractor_model_1.ApiNamespace.getContainerKey(name);
97
104
  let apiNamespace = parentApiItem.tryGetMemberByKey(containerKey);
98
105
  if (apiNamespace === undefined) {
@@ -100,15 +107,20 @@ class ApiModelGenerator {
100
107
  name,
101
108
  docComment: undefined,
102
109
  releaseTag: api_extractor_model_1.ReleaseTag.None,
103
- excerptTokens: []
110
+ excerptTokens: [],
111
+ isExported
104
112
  });
105
113
  parentApiItem.addMember(apiNamespace);
106
114
  }
107
115
  astModule.astModuleExportInfo.exportedLocalEntities.forEach((exportedEntity, exportedName) => {
108
- this._processAstEntity(exportedEntity, exportedName, apiNamespace);
116
+ this._processAstEntity(exportedEntity, {
117
+ name: exportedName,
118
+ isExported: true,
119
+ parentApiItem: apiNamespace
120
+ });
109
121
  });
110
122
  }
111
- _processDeclaration(astDeclaration, exportedName, parentApiItem) {
123
+ _processDeclaration(astDeclaration, context) {
112
124
  if ((astDeclaration.modifierFlags & ts.ModifierFlags.Private) !== 0) {
113
125
  return; // trim out private declarations
114
126
  }
@@ -119,69 +131,70 @@ class ApiModelGenerator {
119
131
  }
120
132
  switch (astDeclaration.declaration.kind) {
121
133
  case ts.SyntaxKind.CallSignature:
122
- this._processApiCallSignature(astDeclaration, exportedName, parentApiItem);
134
+ this._processApiCallSignature(astDeclaration, context);
123
135
  break;
124
136
  case ts.SyntaxKind.Constructor:
125
- this._processApiConstructor(astDeclaration, exportedName, parentApiItem);
137
+ this._processApiConstructor(astDeclaration, context);
126
138
  break;
127
139
  case ts.SyntaxKind.ConstructSignature:
128
- this._processApiConstructSignature(astDeclaration, exportedName, parentApiItem);
140
+ this._processApiConstructSignature(astDeclaration, context);
129
141
  break;
130
142
  case ts.SyntaxKind.ClassDeclaration:
131
- this._processApiClass(astDeclaration, exportedName, parentApiItem);
143
+ this._processApiClass(astDeclaration, context);
132
144
  break;
133
145
  case ts.SyntaxKind.EnumDeclaration:
134
- this._processApiEnum(astDeclaration, exportedName, parentApiItem);
146
+ this._processApiEnum(astDeclaration, context);
135
147
  break;
136
148
  case ts.SyntaxKind.EnumMember:
137
- this._processApiEnumMember(astDeclaration, exportedName, parentApiItem);
149
+ this._processApiEnumMember(astDeclaration, context);
138
150
  break;
139
151
  case ts.SyntaxKind.FunctionDeclaration:
140
- this._processApiFunction(astDeclaration, exportedName, parentApiItem);
152
+ this._processApiFunction(astDeclaration, context);
141
153
  break;
142
154
  case ts.SyntaxKind.GetAccessor:
143
- this._processApiProperty(astDeclaration, exportedName, parentApiItem);
155
+ this._processApiProperty(astDeclaration, context);
144
156
  break;
145
157
  case ts.SyntaxKind.SetAccessor:
146
- this._processApiProperty(astDeclaration, exportedName, parentApiItem);
158
+ this._processApiProperty(astDeclaration, context);
147
159
  break;
148
160
  case ts.SyntaxKind.IndexSignature:
149
- this._processApiIndexSignature(astDeclaration, exportedName, parentApiItem);
161
+ this._processApiIndexSignature(astDeclaration, context);
150
162
  break;
151
163
  case ts.SyntaxKind.InterfaceDeclaration:
152
- this._processApiInterface(astDeclaration, exportedName, parentApiItem);
164
+ this._processApiInterface(astDeclaration, context);
153
165
  break;
154
166
  case ts.SyntaxKind.MethodDeclaration:
155
- this._processApiMethod(astDeclaration, exportedName, parentApiItem);
167
+ this._processApiMethod(astDeclaration, context);
156
168
  break;
157
169
  case ts.SyntaxKind.MethodSignature:
158
- this._processApiMethodSignature(astDeclaration, exportedName, parentApiItem);
170
+ this._processApiMethodSignature(astDeclaration, context);
159
171
  break;
160
172
  case ts.SyntaxKind.ModuleDeclaration:
161
- this._processApiNamespace(astDeclaration, exportedName, parentApiItem);
173
+ this._processApiNamespace(astDeclaration, context);
162
174
  break;
163
175
  case ts.SyntaxKind.PropertyDeclaration:
164
- this._processApiProperty(astDeclaration, exportedName, parentApiItem);
176
+ this._processApiProperty(astDeclaration, context);
165
177
  break;
166
178
  case ts.SyntaxKind.PropertySignature:
167
- this._processApiPropertySignature(astDeclaration, exportedName, parentApiItem);
179
+ this._processApiPropertySignature(astDeclaration, context);
168
180
  break;
169
181
  case ts.SyntaxKind.TypeAliasDeclaration:
170
- this._processApiTypeAlias(astDeclaration, exportedName, parentApiItem);
182
+ this._processApiTypeAlias(astDeclaration, context);
171
183
  break;
172
184
  case ts.SyntaxKind.VariableDeclaration:
173
- this._processApiVariable(astDeclaration, exportedName, parentApiItem);
185
+ this._processApiVariable(astDeclaration, context);
174
186
  break;
175
187
  default:
176
188
  // ignore unknown types
177
189
  }
178
190
  }
179
- _processChildDeclarations(astDeclaration, exportedName, parentApiItem) {
191
+ _processChildDeclarations(astDeclaration, context) {
180
192
  for (const childDeclaration of astDeclaration.children) {
181
- this._processDeclaration(childDeclaration, undefined, parentApiItem);
193
+ this._processDeclaration(childDeclaration, Object.assign(Object.assign({}, context), { name: childDeclaration.astSymbol.localName }));
182
194
  }
183
195
  }
184
- _processApiCallSignature(astDeclaration, exportedName, parentApiItem) {
196
+ _processApiCallSignature(astDeclaration, context) {
197
+ const { parentApiItem } = context;
185
198
  const overloadIndex = this._collector.getOverloadIndex(astDeclaration);
186
199
  const containerKey = api_extractor_model_1.ApiCallSignature.getContainerKey(overloadIndex);
187
200
  let apiCallSignature = parentApiItem.tryGetMemberByKey(containerKey);
@@ -208,7 +221,8 @@ class ApiModelGenerator {
208
221
  parentApiItem.addMember(apiCallSignature);
209
222
  }
210
223
  }
211
- _processApiConstructor(astDeclaration, exportedName, parentApiItem) {
224
+ _processApiConstructor(astDeclaration, context) {
225
+ const { parentApiItem } = context;
212
226
  const overloadIndex = this._collector.getOverloadIndex(astDeclaration);
213
227
  const containerKey = api_extractor_model_1.ApiConstructor.getContainerKey(overloadIndex);
214
228
  let apiConstructor = parentApiItem.tryGetMemberByKey(containerKey);
@@ -232,8 +246,8 @@ class ApiModelGenerator {
232
246
  parentApiItem.addMember(apiConstructor);
233
247
  }
234
248
  }
235
- _processApiClass(astDeclaration, exportedName, parentApiItem) {
236
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
249
+ _processApiClass(astDeclaration, context) {
250
+ const { name, isExported, parentApiItem } = context;
237
251
  const containerKey = api_extractor_model_1.ApiClass.getContainerKey(name);
238
252
  let apiClass = parentApiItem.tryGetMemberByKey(containerKey);
239
253
  if (apiClass === undefined) {
@@ -268,13 +282,15 @@ class ApiModelGenerator {
268
282
  excerptTokens,
269
283
  typeParameters,
270
284
  extendsTokenRange,
271
- implementsTokenRanges
285
+ implementsTokenRanges,
286
+ isExported
272
287
  });
273
288
  parentApiItem.addMember(apiClass);
274
289
  }
275
- this._processChildDeclarations(astDeclaration, exportedName, apiClass);
290
+ this._processChildDeclarations(astDeclaration, Object.assign(Object.assign({}, context), { parentApiItem: apiClass }));
276
291
  }
277
- _processApiConstructSignature(astDeclaration, exportedName, parentApiItem) {
292
+ _processApiConstructSignature(astDeclaration, context) {
293
+ const { parentApiItem } = context;
278
294
  const overloadIndex = this._collector.getOverloadIndex(astDeclaration);
279
295
  const containerKey = api_extractor_model_1.ApiConstructSignature.getContainerKey(overloadIndex);
280
296
  let apiConstructSignature = parentApiItem.tryGetMemberByKey(containerKey);
@@ -301,8 +317,8 @@ class ApiModelGenerator {
301
317
  parentApiItem.addMember(apiConstructSignature);
302
318
  }
303
319
  }
304
- _processApiEnum(astDeclaration, exportedName, parentApiItem) {
305
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
320
+ _processApiEnum(astDeclaration, context) {
321
+ const { name, isExported, parentApiItem } = context;
306
322
  const containerKey = api_extractor_model_1.ApiEnum.getContainerKey(name);
307
323
  let apiEnum = parentApiItem.tryGetMemberByKey(containerKey);
308
324
  if (apiEnum === undefined) {
@@ -311,13 +327,20 @@ class ApiModelGenerator {
311
327
  const docComment = apiItemMetadata.tsdocComment;
312
328
  const releaseTag = apiItemMetadata.effectiveReleaseTag;
313
329
  const preserveMemberOrder = this._collector.extractorConfig.enumMemberOrder === api_extractor_model_1.EnumMemberOrder.Preserve;
314
- apiEnum = new api_extractor_model_1.ApiEnum({ name, docComment, releaseTag, excerptTokens, preserveMemberOrder });
330
+ apiEnum = new api_extractor_model_1.ApiEnum({
331
+ name,
332
+ docComment,
333
+ releaseTag,
334
+ excerptTokens,
335
+ preserveMemberOrder,
336
+ isExported
337
+ });
315
338
  parentApiItem.addMember(apiEnum);
316
339
  }
317
- this._processChildDeclarations(astDeclaration, exportedName, apiEnum);
340
+ this._processChildDeclarations(astDeclaration, Object.assign(Object.assign({}, context), { parentApiItem: apiEnum }));
318
341
  }
319
- _processApiEnumMember(astDeclaration, exportedName, parentApiItem) {
320
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
342
+ _processApiEnumMember(astDeclaration, context) {
343
+ const { name, parentApiItem } = context;
321
344
  const containerKey = api_extractor_model_1.ApiEnumMember.getContainerKey(name);
322
345
  let apiEnumMember = parentApiItem.tryGetMemberByKey(containerKey);
323
346
  if (apiEnumMember === undefined) {
@@ -342,8 +365,8 @@ class ApiModelGenerator {
342
365
  parentApiItem.addMember(apiEnumMember);
343
366
  }
344
367
  }
345
- _processApiFunction(astDeclaration, exportedName, parentApiItem) {
346
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
368
+ _processApiFunction(astDeclaration, context) {
369
+ const { name, isExported, parentApiItem } = context;
347
370
  const overloadIndex = this._collector.getOverloadIndex(astDeclaration);
348
371
  const containerKey = api_extractor_model_1.ApiFunction.getContainerKey(name, overloadIndex);
349
372
  let apiFunction = parentApiItem.tryGetMemberByKey(containerKey);
@@ -358,9 +381,6 @@ class ApiModelGenerator {
358
381
  const apiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);
359
382
  const docComment = apiItemMetadata.tsdocComment;
360
383
  const releaseTag = apiItemMetadata.effectiveReleaseTag;
361
- if (releaseTag === api_extractor_model_1.ReleaseTag.Internal || releaseTag === api_extractor_model_1.ReleaseTag.Alpha) {
362
- return; // trim out items marked as "@internal" or "@alpha"
363
- }
364
384
  apiFunction = new api_extractor_model_1.ApiFunction({
365
385
  name,
366
386
  docComment,
@@ -369,12 +389,14 @@ class ApiModelGenerator {
369
389
  parameters,
370
390
  overloadIndex,
371
391
  excerptTokens,
372
- returnTypeTokenRange
392
+ returnTypeTokenRange,
393
+ isExported
373
394
  });
374
395
  parentApiItem.addMember(apiFunction);
375
396
  }
376
397
  }
377
- _processApiIndexSignature(astDeclaration, exportedName, parentApiItem) {
398
+ _processApiIndexSignature(astDeclaration, context) {
399
+ const { parentApiItem } = context;
378
400
  const overloadIndex = this._collector.getOverloadIndex(astDeclaration);
379
401
  const containerKey = api_extractor_model_1.ApiIndexSignature.getContainerKey(overloadIndex);
380
402
  let apiIndexSignature = parentApiItem.tryGetMemberByKey(containerKey);
@@ -401,8 +423,8 @@ class ApiModelGenerator {
401
423
  parentApiItem.addMember(apiIndexSignature);
402
424
  }
403
425
  }
404
- _processApiInterface(astDeclaration, exportedName, parentApiItem) {
405
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
426
+ _processApiInterface(astDeclaration, context) {
427
+ const { name, isExported, parentApiItem } = context;
406
428
  const containerKey = api_extractor_model_1.ApiInterface.getContainerKey(name);
407
429
  let apiInterface = parentApiItem.tryGetMemberByKey(containerKey);
408
430
  if (apiInterface === undefined) {
@@ -429,14 +451,15 @@ class ApiModelGenerator {
429
451
  releaseTag,
430
452
  excerptTokens,
431
453
  typeParameters,
432
- extendsTokenRanges
454
+ extendsTokenRanges,
455
+ isExported
433
456
  });
434
457
  parentApiItem.addMember(apiInterface);
435
458
  }
436
- this._processChildDeclarations(astDeclaration, exportedName, apiInterface);
459
+ this._processChildDeclarations(astDeclaration, Object.assign(Object.assign({}, context), { parentApiItem: apiInterface }));
437
460
  }
438
- _processApiMethod(astDeclaration, exportedName, parentApiItem) {
439
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
461
+ _processApiMethod(astDeclaration, context) {
462
+ const { name, parentApiItem } = context;
440
463
  const isStatic = (astDeclaration.modifierFlags & ts.ModifierFlags.Static) !== 0;
441
464
  const overloadIndex = this._collector.getOverloadIndex(astDeclaration);
442
465
  const containerKey = api_extractor_model_1.ApiMethod.getContainerKey(name, isStatic, overloadIndex);
@@ -473,8 +496,8 @@ class ApiModelGenerator {
473
496
  parentApiItem.addMember(apiMethod);
474
497
  }
475
498
  }
476
- _processApiMethodSignature(astDeclaration, exportedName, parentApiItem) {
477
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
499
+ _processApiMethodSignature(astDeclaration, context) {
500
+ const { name, parentApiItem } = context;
478
501
  const overloadIndex = this._collector.getOverloadIndex(astDeclaration);
479
502
  const containerKey = api_extractor_model_1.ApiMethodSignature.getContainerKey(name, overloadIndex);
480
503
  let apiMethodSignature = parentApiItem.tryGetMemberByKey(containerKey);
@@ -504,8 +527,8 @@ class ApiModelGenerator {
504
527
  parentApiItem.addMember(apiMethodSignature);
505
528
  }
506
529
  }
507
- _processApiNamespace(astDeclaration, exportedName, parentApiItem) {
508
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
530
+ _processApiNamespace(astDeclaration, context) {
531
+ const { name, isExported, parentApiItem } = context;
509
532
  const containerKey = api_extractor_model_1.ApiNamespace.getContainerKey(name);
510
533
  let apiNamespace = parentApiItem.tryGetMemberByKey(containerKey);
511
534
  if (apiNamespace === undefined) {
@@ -513,13 +536,13 @@ class ApiModelGenerator {
513
536
  const apiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration);
514
537
  const docComment = apiItemMetadata.tsdocComment;
515
538
  const releaseTag = apiItemMetadata.effectiveReleaseTag;
516
- apiNamespace = new api_extractor_model_1.ApiNamespace({ name, docComment, releaseTag, excerptTokens });
539
+ apiNamespace = new api_extractor_model_1.ApiNamespace({ name, docComment, releaseTag, excerptTokens, isExported });
517
540
  parentApiItem.addMember(apiNamespace);
518
541
  }
519
- this._processChildDeclarations(astDeclaration, exportedName, apiNamespace);
542
+ this._processChildDeclarations(astDeclaration, Object.assign(Object.assign({}, context), { parentApiItem: apiNamespace }));
520
543
  }
521
- _processApiProperty(astDeclaration, exportedName, parentApiItem) {
522
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
544
+ _processApiProperty(astDeclaration, context) {
545
+ const { name, parentApiItem } = context;
523
546
  const isStatic = (astDeclaration.modifierFlags & ts.ModifierFlags.Static) !== 0;
524
547
  const containerKey = api_extractor_model_1.ApiProperty.getContainerKey(name, isStatic);
525
548
  let apiProperty = parentApiItem.tryGetMemberByKey(containerKey);
@@ -567,8 +590,8 @@ class ApiModelGenerator {
567
590
  // we assume its signature is identical, because the language requires that.
568
591
  }
569
592
  }
570
- _processApiPropertySignature(astDeclaration, exportedName, parentApiItem) {
571
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
593
+ _processApiPropertySignature(astDeclaration, context) {
594
+ const { name, parentApiItem } = context;
572
595
  const containerKey = api_extractor_model_1.ApiPropertySignature.getContainerKey(name);
573
596
  let apiPropertySignature = parentApiItem.tryGetMemberByKey(containerKey);
574
597
  if (apiPropertySignature === undefined) {
@@ -598,8 +621,8 @@ class ApiModelGenerator {
598
621
  // we assume its signature is identical, because the language requires that.
599
622
  }
600
623
  }
601
- _processApiTypeAlias(astDeclaration, exportedName, parentApiItem) {
602
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
624
+ _processApiTypeAlias(astDeclaration, context) {
625
+ const { name, isExported, parentApiItem } = context;
603
626
  const containerKey = api_extractor_model_1.ApiTypeAlias.getContainerKey(name);
604
627
  let apiTypeAlias = parentApiItem.tryGetMemberByKey(containerKey);
605
628
  if (apiTypeAlias === undefined) {
@@ -618,13 +641,14 @@ class ApiModelGenerator {
618
641
  typeParameters,
619
642
  releaseTag,
620
643
  excerptTokens,
621
- typeTokenRange
644
+ typeTokenRange,
645
+ isExported
622
646
  });
623
647
  parentApiItem.addMember(apiTypeAlias);
624
648
  }
625
649
  }
626
- _processApiVariable(astDeclaration, exportedName, parentApiItem) {
627
- const name = exportedName ? exportedName : astDeclaration.astSymbol.localName;
650
+ _processApiVariable(astDeclaration, context) {
651
+ const { name, isExported, parentApiItem } = context;
628
652
  const containerKey = api_extractor_model_1.ApiVariable.getContainerKey(name);
629
653
  let apiVariable = parentApiItem.tryGetMemberByKey(containerKey);
630
654
  if (apiVariable === undefined) {
@@ -649,7 +673,8 @@ class ApiModelGenerator {
649
673
  excerptTokens,
650
674
  variableTypeTokenRange,
651
675
  initializerTokenRange,
652
- isReadonly
676
+ isReadonly,
677
+ isExported
653
678
  });
654
679
  parentApiItem.addMember(apiVariable);
655
680
  }