* @param {import('ts-morph').Node} node * @returns {import('ts-morph').TypeAliasDeclarationStructure}
(node)
| 401 | * @returns {import('ts-morph').TypeAliasDeclarationStructure} |
| 402 | */ |
| 403 | function getAliasStructure(node) { |
| 404 | const result = node.getStructure() |
| 405 | const type = node.getType() |
| 406 | const properties = type.getProperties().reduce((arr, symbol) => { |
| 407 | const node = symbol.getValueDeclaration() |
| 408 | if (node) arr.push(node.getStructure()) |
| 409 | return arr |
| 410 | }, []) |
| 411 | if (properties.length) result.properties = properties |
| 412 | return result |
| 413 | } |