npm.io
0.1.5 • Published 4 years ago

typify_gostruct_wasm

Licence
MIT OR Apache-2.0
Version
0.1.5
Deps
0
Size
73 kB
Vulns
0
Weekly
0
Stars
2

typify_gostruct_wasm

A wrapper around the rust gostruct type interpreter. -> https://github.com/tevs-rust-land/typify_gostruct

About

The struct interpreter converts a struct to type objects/interfaces of provided languages.

The current languages available are flow & typescript. I'll add support for other languages as time goes.

Usage

import("typify_gostruct_wasm").then(({ transform }) => {
  const struct = `
      type person struct {
        name string
        age  int
    }
      `;

  try {
    const flowResult = transform(struct, "flow");
    const typescriptResult = transform(struct, "typescript");
  } catch (err) {}
});

This wasm module has been Built with & assembly.

Batteries Included