Skip to content

Commit

Permalink
chore: update symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jul 20, 2021
1 parent 4c2945d commit 781a091
Show file tree
Hide file tree
Showing 9 changed files with 19,517 additions and 990,842 deletions.
10 changes: 3 additions & 7 deletions misc/structured-types/src/SymbolParser.ts
Expand Up @@ -411,21 +411,17 @@ export class SymbolParser implements ISymbolParser {
prop.properties = properties;
}
} else if (ts.isTypeReferenceNode(node)) {
let type: PropType | string | undefined;
const symbol = this.checker.getSymbolAtLocation(node.typeName);
if (
symbol &&
symbol.escapedName &&
!this.skipProperty(symbol.escapedName.toString())
) {
if (prop.parent) {
}
this.addRefSymbol(prop, symbol);
} else {
const name = node.getText();
if (typeof type === 'string' && !prop.displayName) {
prop.displayName = name;
} else {
prop.type = name;
}
prop.type = node.getText();
}
if (node.typeArguments?.length && hasGenerics(prop)) {
prop.generics = this.parseProperties(node.typeArguments);
Expand Down
3 changes: 2 additions & 1 deletion misc/structured-types/src/ts-utils.ts
Expand Up @@ -401,7 +401,8 @@ export const getObjectStaticProp = (
): ts.Expression | undefined => {
const staticProp =
isObjectTypeDeclaration(obj) &&
((obj.members?.find as unknown) as NodeFind)(
obj.members &&
((obj.members.find as unknown) as NodeFind)(
m => m.name.getText() === propName,
);
if (staticProp) {
Expand Down

0 comments on commit 781a091

Please sign in to comment.