quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

Question: Typescript -> (kotlin/Swift) with Integer

Open john-twigg-ck opened this issue 2 years ago • 2 comments

How do generate an integer when Typescript is the source, given that it only supports number which automatically becomes a Double in the target languages?

john-twigg-ck avatar Mar 31 '22 17:03 john-twigg-ck

I have a similar problem. I am converting typescript to swift.

tienne avatar Apr 18 '22 06:04 tienne

i found use jsdoc

export interface Menu {
  /**
   * @type integer
   */
  seq?:         number;
  name:         string;
  isFavorite:   boolean;
  
  isAlcohol:    boolean;
  price:        number;
  position?:    MenuPosition;
}

tienne avatar Apr 18 '22 06:04 tienne