jhipster / jdl-studio

JDL Studio is an online JHipster Domain Language visual editor
https://start.jhipster.tech/jdl-studio/
Apache License 2.0
405 stars 114 forks source link

Is there a way to use characters such as "@" and "$" at the beginning of the attribute of Angular/Typescript interface/class? #119

Closed javac9 closed 3 years ago

javac9 commented 3 years ago

I have this requirement to add an attribute @type. I can't get it working In the JDL-Studio. I then tried adding it manually. In the interface, it's OK but the problem arises when I try to include it in the implementing class`constructor:

export interface IPerson {
  ...
  '@type': string; // here it's ok
}

export class Person implements IPerson {

  constructor(
    ...
    // here, however, the compiler goes 
    // nuts, showing it in red and underlined
    public '@type': string
}

Is there any way of achieving this?