pbomb / flow-immutable-models

Generates model classes from Flow types using Immutable.js
42 stars 8 forks source link

Support static properties #20

Closed rgbkrk closed 7 years ago

rgbkrk commented 7 years ago

When a type has a static string like cell_type below here:

export type MarkdownCellType = {
  cell_type: 'markdown',
  source: string,
}

export type CodeCellType = {
  cell_type: 'code',
  source: string,
  outputs: Immutable.List<string>,
}

export type Cell = MarkdownCellType | CodeCellType;

It would be great if the generated class set cell_type as a static property on the generated class.

/cc @peggyrayzis

pbomb commented 7 years ago

This has been fixed in v0.10.0