()
| 52748 | return createTypeNodeFromObjectType(type); |
| 52749 | } |
| 52750 | function shouldWriteTypeOfFunctionSymbol() { |
| 52751 | var _a; |
| 52752 | var isStaticMethodSymbol = !!(symbol.flags & 8192 /* SymbolFlags.Method */) && // typeof static method |
| 52753 | ts.some(symbol.declarations, function (declaration) { return ts.isStatic(declaration); }); |
| 52754 | var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* SymbolFlags.Function */) && |
| 52755 | (symbol.parent || // is exported function symbol |
| 52756 | ts.forEach(symbol.declarations, function (declaration) { |
| 52757 | return declaration.parent.kind === 305 /* SyntaxKind.SourceFile */ || declaration.parent.kind === 262 /* SyntaxKind.ModuleBlock */; |
| 52758 | })); |
| 52759 | if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { |
| 52760 | // typeof is allowed only for static/non local functions |
| 52761 | return (!!(context.flags & 4096 /* NodeBuilderFlags.UseTypeOfFunction */) || ((_a = context.visitedTypes) === null || _a === void 0 ? void 0 : _a.has(typeId))) && // it is type of the symbol uses itself recursively |
| 52762 | (!(context.flags & 8 /* NodeBuilderFlags.UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); // And the build is going to succeed without visibility error or there is no structural fallback allowed |
| 52763 | } |
| 52764 | } |
| 52765 | } |
| 52766 | function visitAndTransformType(type, transform) { |
| 52767 | var _a, _b; |
no test coverage detected
searching dependent graphs…