* @param {import('ts-morph').Node} node
(node)
| 361 | * @param {import('ts-morph').Node} node |
| 362 | */ |
| 363 | function getExtends(node) { |
| 364 | return node.getExtends().map(() => { |
| 365 | const result = {} |
| 366 | /** @type {import('ts-morph').Type} */ |
| 367 | result.properties = result.properties || [] |
| 368 | result.methods = result.methods || [] |
| 369 | node.getExtends().map(symbol => |
| 370 | symbol |
| 371 | .getType() |
| 372 | .getProperties() |
| 373 | .forEach(symbol => { |
| 374 | symbol.getDeclarations().forEach(declaration => { |
| 375 | const structure = declaration.getStructure() |
| 376 | if (structure.kind === StructureKind.Method || structure.kind === StructureKind.MethodSignature) { |
| 377 | result.methods.push(structure) |
| 378 | } else { |
| 379 | result.properties.push(structure) |
| 380 | } |
| 381 | }) |
| 382 | }), |
| 383 | ) |
| 384 | return result |
| 385 | }) |
| 386 | } |
| 387 | |
| 388 | /** |
| 389 | * @param {import('ts-morph').Node} node |