tsmd

Crates.iotsmd
lib.rstsmd
version0.1.2
sourcesrc
created_at2020-07-02 12:49:14.953388
updated_at2020-07-29 03:43:17.526844
descriptiongenerate markdown tables from type script files
homepage
repositoryhttps://github.com/nonnontrivial/blubber.git
max_upload_size
id260622
size29,313
Kevin Donahue (nonnontrivial)

documentation

README

tsmd

Rust

Purpose

This is a CLI that generates .md documentation for interfaces in .ts source files.

Limitations

This project does not yet support the following desirable features

  • resolve non-interface declarations into meaningful docs
  • resolve generic parameters and contraints into meaninful docs
  • allow vector of source .ts files

Installation & Guide

cargo install tsmd

Running the following command will create ./input.md and fill it with a markdown table for each interface in ./input.ts.

tsmd -s ./input.ts

When ./input.ts looks like this,

export interface Output<A extends LowLevelAsset<unknown>> {
  id: string;
  timestamp: string;
  data: Omit<A, "">;
}

export interface LowLevelAsset<D> {
  filename?: string;
  filenames?: string[];
  data: D;
}

./input.md will look like the following.

## Output

| Field | Type |
| --- | --- |
| timestamp | `string` |
| id | `string` |
| data | `Omit<A, "">` |
## LowLevelAsset

| Field | Type |
| --- | --- |
| filenames? | `string[]` |
| filename? | `string` |
| data | `D` |
Commit count: 0

cargo fmt