typescript

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	Report  analyzer.Report
	Files   map[string]string
	BaseDir string
}

Generator handles TypeScript code generation

func New

func New(report analyzer.Report) *Generator

New creates a new TypeScript code generator

func (*Generator) Generate

func (g *Generator) Generate() (string, error)

Generate generates TypeScript code for all transactions and scripts

func (*Generator) SetBaseDir

func (g *Generator) SetBaseDir(dir string)

SetBaseDir sets the base directory for reading files

type TypeScriptField

type TypeScriptField struct {
	Name     string
	Type     string
	Optional bool
}

TypeScriptField represents a field in a TypeScript interface

type TypeScriptFunction

type TypeScriptFunction struct {
	Name       string
	Parameters []TypeScriptParameter
	ReturnType string
	Base64     string
	Type       string
}

TypeScriptFunction represents a function in the generated code

type TypeScriptInterface

type TypeScriptInterface struct {
	Name   string
	Fields []TypeScriptField
}

TypeScriptInterface represents an interface in TypeScript

type TypeScriptParameter

type TypeScriptParameter struct {
	Name     string
	Type     string
	Optional bool
	TypeStr  string // Original Cadence type string
}

TypeScriptParameter represents a parameter in TypeScript

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL