Docs@skmtc/core

Projections and snippets

FUNCTION

toGeneratorOnlyKey

@skmtc/core 0.63.4

Creates a generator-only key for global/utility generators.

Generator-only keys identify generators that produce artifacts not tied to specific operations or models, such as configuration files, base classes, utilities, or documentation.

Signature

import { toGeneratorOnlyKey } from '@skmtc/core'

toGeneratorOnlyKey(args: ToGeneratorOnlyKeyArgs): GeneratorOnlyKey

Parameters

args, ToGeneratorOnlyKeyArgs required

Generator-only key arguments

generatorId, string required

Unique identifier for the generator

Example
const configKey = toGeneratorOnlyKey({
  generatorId: 'api-config'
});
// Result: 'api-config' (branded)

const utilsKey = toGeneratorOnlyKey({
  generatorId: 'common-utilities'
});
// Result: 'common-utilities' (branded)

Returns

GeneratorOnlyKey

A branded GeneratorOnlyKey