MohamedBeydoun / atlas

An express-typescript code generator
Apache License 2.0
6 stars 0 forks source link

Illegal use of javascript keywords #43

Open AsFal opened 4 years ago

AsFal commented 4 years ago

Problem

Ex: atlas generate model another --fields name=string,friends=string[] Output:

In databse/interactions/new.ts

    create: (new: INew): Promise<INewModel> => {
        return New.create(new); 
    },

Illegal use of the "new" keyword on line 2.

Note

The problem can be generalized to other keywords (i.e. this, return, from, etc.)

Be wary of typescript special interfaces (Partial, Omit, etc.)