@typespec-tools/emitter-typescript
v0.3.0
Published
TypeSpec library for emitting Typescript types from the [TypeSpec](https://typespec.io) DSL.
Downloads
11
Maintainers
Readme
@typespec-tools/emitter-typescript
TypeSpec library for emitting Typescript types from the TypeSpec DSL.
[!WARNING] This library uses the current emitter-framework that is set to be updated, which could cause breaking changes.
Disclaimer: Please note that this library is not officially affiliated with TypeSpec or Azure. It is an independent project started by @codingmatty.
Full Disclosure: This library was created primarily from the emitter-framework test case to be able to publish it.
Features / Roadmap
- [x] Emit basic Typescript types from a TypeSpec file
- [ ] Add support for decorators
Install
npm install @typespec-tools/emitter-typescript
Emitter
Usage
- Via the command line
tsp compile . --emit=@typespec-tools/emitter-typescript
- Via the config
emit:
- "@typespec-tools/emitter-typescript"
The config can be extended with options as follows:
emit:
- "@typespec-tools/emitter-typescript"
options:
"@typespec-tools/emitter-typescript":
option: value
Emitter options
| Option | Type | Default | Description |
| ------------- | ------ | ----------- | ----------------------- |
| output-file
| string | "output.ts" | Name of the output file |