@compas/code-gen
Version:
Generate various boring parts of your server
21 lines (20 loc) • 1.48 kB
TypeScript
/**
* Recursively check which targets are used by the provided type, including the
* references.
*
* @param {import("../generate.js").GenerateContext} generateContext
* @param {import("../generated/common/types.js").StructureTypeSystemDefinition} type
* @returns {Array<import("../generated/common/types.js").StructureAnyDefinitionTarget>}
*/
export function typeTargetsDetermine(generateContext: import("../generate.js").GenerateContext, type: import("../generated/common/types.js").StructureTypeSystemDefinition): Array<import("../generated/common/types.js").StructureAnyDefinitionTarget>;
/**
* Filter out the targets that will be used based on the targets that the type provides
* special handling for and which targets can be used by the provider.
*
* Does not alter the order of the provided {@link usedTargetsByGenerator} array.
*
* @param {Array<import("../generated/common/types.js").StructureAnyDefinitionTarget>} availableTargetsInType
* @param {Array<import("../generated/common/types.js").StructureAnyDefinitionTarget>} usedTargetsByGenerator
* @returns {Array<import("../generated/common/types.js").StructureAnyDefinitionTarget>}
*/
export function typeTargetsGetUsed(availableTargetsInType: Array<import("../generated/common/types.js").StructureAnyDefinitionTarget>, usedTargetsByGenerator: Array<import("../generated/common/types.js").StructureAnyDefinitionTarget>): Array<import("../generated/common/types.js").StructureAnyDefinitionTarget>;