(model: Model, includeIgnored = false)
| 523 | * Gets data models and type defs in the ZModel schema. |
| 524 | */ |
| 525 | export function getDataModelAndTypeDefs(model: Model, includeIgnored = false) { |
| 526 | const r = model.declarations.filter((d): d is DataModel | TypeDef => isDataModel(d) || isTypeDef(d)); |
| 527 | if (includeIgnored) { |
| 528 | return r; |
| 529 | } else { |
| 530 | return r.filter((model) => !hasAttribute(model, '@@ignore')); |
| 531 | } |
| 532 | } |
| 533 | |
| 534 | /** |
| 535 | * Gets all declarations of the given model and its transitive imports. |
no test coverage detected