Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Output additional entities for consumption on client system #293

@ScottWallace

Description

@ScottWallace

Great product, one suggestion:

I'd like it to also output a collection of entities with no decorators for Typeorm. I use this tool on the server side, which delivers the JSON output to a website. I would like to have equivalent entities for the website so that I can map them in. Basically, the same entity output, plus another with the decorators stripped out.

In addition to this output, for the server-side:

@Entity("Post")
export class Post {
    @PrimaryColumn()
    id: number;

    @Column()
    name: string;

    @Column("bit")
    bit: boolean;

    @Column("int")
    int: number;

    @Column("int", { unsigned: true })
    uint: number;

    @Column("tinyint")
    tinyint: number;

    ...

I'd like to also get a collection of entities with this format, for consumption on client-side:

export class Post {
    id: number;
    name: string;
    bit: boolean;
    int: number;
    uint: number;
    tinyint: number;
    ...

That way, I can typecheck on the browser as well.

A wonderful product as it is, however!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementnew feature or bug with easy workaround

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions