glideapps/quicktype

[BUG]: QuickType 23.1.1 does not apply --just-types flag for typescript

Closed this issue · 0 comments

When using the --just-types flag it does not output just-types.

Issue Type

This is an issue with the output.

Context (Environment, Version, Language)

Input Format: json
Output Language: typescript

CLI

Version: 23.1.1

Description

With the version 23.1.1, invoking the following...

echo '{"name": "test"}' | quicktype --just-types -l ts

produces an output with all the utilities, etc, it ignores just-types.

However, reverting to 23.0.0, I did not test other versions, the output is just the type as expected.

Input Data

{"name": "test"}

Expected Behaviour / Output

export interface TopLevel {
    name: string;
}

Current Behaviour / Output

it outputs the interface along with the contents of export Class Convert... and various other utilities.

Steps to Reproduce

  1. npm i -g quicktype@23.0.0
  2. echo '{"name": "test"}' | quicktype --just-types -l ts
  3. npm uninstall -g quicktype && npm i -g quicktype
  4. echo '{"name": "test"}' | quicktype --just-types -l ts

Possible Solution