Skip to content

2.7.0

Compare
Choose a tag to compare
@tylim88 tylim88 released this 14 Nov 21:04
· 37 commits to main since this release

no longer support full flattened path if the key is string

given this type:

{
  a: Record<string,{ b: number, c: { d: string } }>
}

previously firelord generates the flattened path that look like:

{
  a: Record<string,{ b: number, c: { d: string } }>
  [x : `a.${string}`]: { b: number, c: { d: string } }
  [x : `a.${string}.b`]: number
  [x : `a.${string}.c`]: { d: string }
  [x : `a.${string}.c.d`]: string
}

the problem is: a.${string}.b, a.${string}.c and a.${string}.c.d will collapsed into a.${string}

to address this issue, firelord now generates:

{
  a: Record<string, { b: number, c: { d: string }, `c.d`: string }>
}

firelord will not attempt to flatten mapped type, but will still continue to flatten any nested object literal type, in this case it is the c.d

affected operation: all update operations

Remove JSON type

JSON type is now available by accessing meta type instead: Example['readJSON']