@fstn/typescript-data-generator
TypeScript icon, indicating that this package has built-in type declarations

1.0.37 • Public • Published

typescript-data-generator

Data generator decorator based for Typescript classes

Allow to use decorator to generate data

export class Owner{
    @Fake(faker.name.firstName)
    firstName!: string;
    @Fake((context)=>"Stephen"))
    lastName!: string;
    @Generate()((context:any,scope:any)=>get(scope)(new Car(),context))
    car!: Car;
}

See test file for more examples

Readme

Keywords

none

Package Sidebar

Install

npm i @fstn/typescript-data-generator

Weekly Downloads

14

Version

1.0.37

License

MIT

Unpacked Size

137 kB

Total Files

45

Last publish

Collaborators

  • fstn