mesqueeb / flatten-anything

Flatten objects and replace nested props with 'prop.subprop'. A simple and small integration.
https://npmjs.com/flatten-anything
MIT License
30 stars 1 forks source link

Return types ? #20

Open stychu opened 2 months ago

stychu commented 2 months ago

Will this ever support full typescript return typings?

import { flatten } from 'flatten-anything'

const target = { name: 'Ho-oh', types: { fire: true, flying: true } }as const

const ads= flatten(target)

type of ads = any <---- I would expect types of the values to by correctly inferred.

mesqueeb commented 1 month ago

PRs welcome!