Skip to main content

blueprint.generator_2.normalizetypename

Home > @blaze-cardano/blueprint > Generator_2 > normalizeTypeName

Generator_2.normalizeTypeName() method

Normalizes a full definition name into a valid TypeScript identifier. Handles generic types by extracting type parameters from the schema when available, falling back to parsing the definition name string.

Signature:

normalizeTypeName(fullDefinitionName: string, schema?: Annotated<Schema>): string;

Parameters

Parameter

Type

Description

fullDefinitionName

string

The full definition name from plutus.json

schema

Annotated<Schema>

(Optional) Optional schema definition to extract type params from structure

Returns:

string

A normalized TypeScript-safe type name