typespec-emitter-framework

Build TypeSpec emitters with a JSX-powered declarative framework for TypeScript, C#, and Python targets.

1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/hafley66/claude-research --skill typespec-emitter-framework
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typespec-emitter-framework
Source: https://github.com/hafley66/claude-research/tree/main/skills/typespec-emitter-framework
Command: npx skills add https://github.com/hafley66/claude-research --skill typespec-emitter-framework

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeSpec emitter framework built on Alloy removes the need for imperative string assembly by offering a declarative, JSX-based approach to generate language-targeted outputs from the TypeSpec graph.

Core Features & Use Cases

  • JSX-based emitters with useTsp() hook and Output wrapper to access the TypeSpec program
  • TypeSpec-to-language mapping through reusable components for TypeScript, C#, and Python targets
  • Composable emitter components that unlock cross-project reuse
  • writeOutput-based disk rendering with automatic handling of imports and formatting

Quick Start

Install the emitter framework and start composing emitters with JSX components to generate targeted TypeSpec outputs.

Frequently Asked Questions about typespec-emitter-framework

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate code from TypeSpec without manual string assembly?

A JSX-based TypeSpec emitter allows you to define code generation templates declaratively. It uses composable components and the useTsp() hook to interact with the TypeSpec graph, replacing imperative string building with structured output rendering.

Can I generate TypeScript, C#, and Python targets from a single TypeSpec definition?

Yes, the framework provides built-in language components for generating TypeScript, C#, and Python targets from a single TypeSpec definition. It maps the TypeSpec program graph to these languages using reusable, composable emitter components.

How do I write generated files to disk while managing imports automatically?

The framework uses the writeOutput utility to render generated code to disk. It automatically handles imports and formatting, ensuring the emitted output for the target language is correctly structured without manual intervention.

Does the Alloy emitter framework support accessing the TypeSpec program graph directly?

Yes, the framework provides the useTsp() hook and an Output wrapper to access the TypeSpec program graph directly. This allows your JSX emitter components to read and traverse the program graph during code generation.

What are the limitations of using declarative JSX for TypeSpec emitters?

Using declarative JSX for TypeSpec emitters requires familiarity with the Alloy framework and its component model. If your target language lacks built-in components, you must build custom emitter components from scratch to map the TypeSpec graph.