danibram / mocker-data-generator

A simplified way to generate masive mock data based on a schema, you can use the awesome fake/random data generators like (FakerJs, ChanceJs, CasualJs and RandExpJs)
https://danibram.github.io/mocker-data-generator/
MIT License
426 stars 45 forks source link

Allow generic types for Generator object attribute #113

Closed CarlosBalladares closed 3 years ago

CarlosBalladares commented 3 years ago

Rationale

In general usage Generator instance's object attribute will have a predefined data type. Adding the ability to make this type a generic will allow a typescript user to define the expected type without casting to any. This is useful when writing virtuals where we access directly the object attribute.

Attachment

See the compiler errors

image

CarlosBalladares commented 3 years ago

open PR #114

CarlosBalladares commented 3 years ago

Closing as resolved