typedoc 0.25.5 → 0.25.7

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.
@@ -276,8 +276,7 @@ function convertFunctionOrMethod(context, symbol, exportSymbol) {
276
276
  for (const sig of signatures) {
277
277
  (0, signature_1.createSignature)(scope, models_1.ReflectionKind.CallSignature, sig, symbol);
278
278
  }
279
- convertFunctionProperties(scope, symbol, type);
280
- return typescript_1.default.SymbolFlags.NamespaceModule;
279
+ return convertFunctionProperties(scope, symbol, type);
281
280
  }
282
281
  // getDeclaredTypeOfSymbol gets the INSTANCE type
283
282
  // getTypeOfSymbolAtLocation gets the STATIC type
@@ -573,6 +572,7 @@ function convertFunctionProperties(context, symbol, type) {
573
572
  ((0, enum_1.hasAllFlags)(symbol.flags, nsFlags) ||
574
573
  !(0, enum_1.hasAnyFlag)(symbol.flags, nsFlags))) {
575
574
  convertSymbols(context, type.getProperties());
575
+ return typescript_1.default.SymbolFlags.NamespaceModule;
576
576
  }
577
577
  }
578
578
  function convertAccessor(context, symbol, exportSymbol) {
@@ -64,7 +64,7 @@ function loadConverters() {
64
64
  exports.loadConverters = loadConverters;
65
65
  // This ought not be necessary, but we need some way to discover recursively
66
66
  // typed symbols which do not have type nodes. See the `recursive` symbol in the variables test.
67
- const seenTypeSymbols = new Set();
67
+ const seenTypes = new Set();
68
68
  function maybeConvertType(context, typeOrNode) {
69
69
  if (!typeOrNode) {
70
70
  return;
@@ -86,24 +86,17 @@ function convertType(context, typeOrNode) {
86
86
  // TS 4.2 added this to enable better tracking of type aliases.
87
87
  // We need to check it here, not just in the union checker, because typeToTypeNode
88
88
  // will use the origin when serializing
89
- if (typeOrNode.isUnion() &&
90
- typeOrNode.origin &&
91
- !typeOrNode.origin.isUnion()) {
89
+ // aliasSymbol check is important - #2468
90
+ if (typeOrNode.isUnion() && typeOrNode.origin && !typeOrNode.aliasSymbol) {
92
91
  return convertType(context, typeOrNode.origin);
93
92
  }
94
93
  // IgnoreErrors is important, without it, we can't assert that we will get a node.
95
94
  const node = context.checker.typeToTypeNode(typeOrNode, void 0, typescript_1.default.NodeBuilderFlags.IgnoreErrors);
96
95
  (0, assert_1.default)(node); // According to the TS source of typeToString, this is a bug if it does not hold.
97
- const symbol = typeOrNode.getSymbol();
98
- if (symbol) {
99
- if (node.kind !== typescript_1.default.SyntaxKind.TypeReference &&
100
- node.kind !== typescript_1.default.SyntaxKind.ArrayType &&
101
- seenTypeSymbols.has(symbol)) {
102
- const typeString = context.checker.typeToString(typeOrNode);
103
- context.logger.verbose(`Refusing to recurse when converting type: ${typeString}`);
104
- return new models_1.UnknownType(typeString);
105
- }
106
- seenTypeSymbols.add(symbol);
96
+ if (seenTypes.has(typeOrNode.id)) {
97
+ const typeString = context.checker.typeToString(typeOrNode);
98
+ context.logger.verbose(`Refusing to recurse when converting type: ${typeString}`);
99
+ return new models_1.UnknownType(typeString);
107
100
  }
108
101
  let converter = converters.get(node.kind);
109
102
  if (converter) {
@@ -112,9 +105,9 @@ function convertType(context, typeOrNode) {
112
105
  !typeOrNode.isIntersection()) {
113
106
  converter = typeLiteralConverter;
114
107
  }
108
+ seenTypes.add(typeOrNode.id);
115
109
  const result = converter.convertType(context, typeOrNode, node);
116
- if (symbol)
117
- seenTypeSymbols.delete(symbol);
110
+ seenTypes.delete(typeOrNode.id);
118
111
  return result;
119
112
  }
120
113
  return requestBugReport(context, typeOrNode);
@@ -151,8 +151,6 @@ export declare abstract class Reflection {
151
151
  hasOwnDocument?: boolean;
152
152
  /**
153
153
  * Url safe alias for this reflection.
154
- *
155
- * @see {@link BaseReflection.getAlias}
156
154
  */
157
155
  private _alias?;
158
156
  private _aliases?;
@@ -30,7 +30,6 @@ export declare class TypeDocReader implements OptionsReader {
30
30
  *
31
31
  * @param path Path to the typedoc.(js|json) file. If path is a directory
32
32
  * typedoc file will be attempted to be found at the root of this path
33
- * @param logger
34
33
  * @return the typedoc.(js|json) file path or undefined
35
34
  */
36
35
  private findTypedocFile;
@@ -149,7 +149,6 @@ class TypeDocReader {
149
149
  *
150
150
  * @param path Path to the typedoc.(js|json) file. If path is a directory
151
151
  * typedoc file will be attempted to be found at the root of this path
152
- * @param logger
153
152
  * @return the typedoc.(js|json) file path or undefined
154
153
  */
155
154
  findTypedocFile(path) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typedoc",
3
3
  "description": "Create api documentation for TypeScript projects.",
4
- "version": "0.25.5",
4
+ "version": "0.25.7",
5
5
  "homepage": "https://typedoc.org",
6
6
  "exports": {
7
7
  ".": "./dist/index.js",