MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / getExtends

Function getExtends

test/runner/definitions_test.js:363–386  ·  view source on GitHub ↗

* @param {import('ts-morph').Node} node

(node)

Source from the content-addressed store, hash-verified

361 * @param {import('ts-morph').Node} node
362 */
363function 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

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected