Comparing version 0.25.5 to 0.25.6
@@ -67,3 +67,3 @@ "use strict"; | ||
// typed symbols which do not have type nodes. See the `recursive` symbol in the variables test. | ||
const seenTypeSymbols = new Set(); | ||
const seenTypes = new Set(); | ||
function maybeConvertType(context, typeOrNode) { | ||
@@ -90,5 +90,7 @@ if (!typeOrNode) { | ||
// will use the origin when serializing | ||
// aliasSymbol check is important - #2468 | ||
if (typeOrNode.isUnion() && | ||
typeOrNode.origin && | ||
!typeOrNode.origin.isUnion()) { | ||
!typeOrNode.origin.isUnion() && | ||
!typeOrNode.aliasSymbol) { | ||
return convertType(context, typeOrNode.origin); | ||
@@ -99,12 +101,6 @@ } | ||
(0, assert_1.default)(node); // According to the TS source of typeToString, this is a bug if it does not hold. | ||
const symbol = typeOrNode.getSymbol(); | ||
if (symbol) { | ||
if (node.kind !== typescript_1.default.SyntaxKind.TypeReference && | ||
node.kind !== typescript_1.default.SyntaxKind.ArrayType && | ||
seenTypeSymbols.has(symbol)) { | ||
const typeString = context.checker.typeToString(typeOrNode); | ||
context.logger.verbose(`Refusing to recurse when converting type: ${typeString}`); | ||
return new models_1.UnknownType(typeString); | ||
} | ||
seenTypeSymbols.add(symbol); | ||
if (seenTypes.has(typeOrNode.id)) { | ||
const typeString = context.checker.typeToString(typeOrNode); | ||
context.logger.verbose(`Refusing to recurse when converting type: ${typeString}`); | ||
return new models_1.UnknownType(typeString); | ||
} | ||
@@ -118,5 +114,5 @@ let converter = converters.get(node.kind); | ||
} | ||
seenTypes.add(typeOrNode.id); | ||
const result = converter.convertType(context, typeOrNode, node); | ||
if (symbol) | ||
seenTypeSymbols.delete(symbol); | ||
seenTypes.delete(typeOrNode.id); | ||
return result; | ||
@@ -123,0 +119,0 @@ } |
@@ -154,4 +154,2 @@ import { Comment } from "../comments/comment"; | ||
* Url safe alias for this reflection. | ||
* | ||
* @see {@link BaseReflection.getAlias} | ||
*/ | ||
@@ -158,0 +156,0 @@ private _alias?; |
@@ -33,3 +33,2 @@ import type { OptionsReader } from ".."; | ||
* typedoc file will be attempted to be found at the root of this path | ||
* @param logger | ||
* @return the typedoc.(js|json) file path or undefined | ||
@@ -36,0 +35,0 @@ */ |
@@ -152,3 +152,2 @@ "use strict"; | ||
* typedoc file will be attempted to be found at the root of this path | ||
* @param logger | ||
* @return the typedoc.(js|json) file path or undefined | ||
@@ -155,0 +154,0 @@ */ |
{ | ||
"name": "typedoc", | ||
"description": "Create api documentation for TypeScript projects.", | ||
"version": "0.25.5", | ||
"version": "0.25.6", | ||
"homepage": "https://typedoc.org", | ||
@@ -6,0 +6,0 @@ "exports": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1392003
31835