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

Output additional entities for consumption on client system #293

Open
ScottWallace opened this issue Aug 16, 2020 · 0 comments
Open

Output additional entities for consumption on client system #293

ScottWallace opened this issue Aug 16, 2020 · 0 comments
Labels
enhancement new feature or bug with easy workaround

Comments

@ScottWallace
Copy link

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!

@Kononnable Kononnable added the enhancement new feature or bug with easy workaround label Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement new feature or bug with easy workaround
Projects
None yet
Development

No branches or pull requests

2 participants