Operations
toOasOperationIndexBase
Build a base class for a declaration whose value is an Index - a Kotlin class body, a C# class body - rather than one that is a subject's artifact.
Two things separate it from toOasOperationProjectionBase:
The value carries an toIndexGeneratorKey rather than the operation's own. A subject-derived key is what makes many operations resolving to one definition fail the integrity check on the second of them; a key made of the Index's file and path is computed identically by every subject, while still carrying the generatorId that stops another generator claiming the declaration.
And it holds the definitions and applies the Index rules, so the engine can insert into it. The subclass renders them; where they sit in the declaration, and at what indentation, is the language's business, not the engine's.
Signature
import { toOasOperationIndexBase } from '@skmtc/core'
toOasOperationIndexBase<EnrichmentType = undefined, IdType extends IdentifierType = IdentifierType>(
base: LangSnippetConstructor,
config: OasOperationIndexBaseConfig<EnrichmentType, IdType>
): OasOperationIndexBaseClass<EnrichmentType, IdType>