AKclown / js-to-ts

The vscode plugin converts js/json/swagger/api to typescript declaration
MIT License
22 stars 1 forks source link

feat: Automatically detect maps and update changelog #11

Closed AKclown closed 1 year ago

AKclown commented 1 year ago

0.5.0 (2023-06-28)

  1. 添加Automatically detect maps
    {
    "should_be_ts_map_not_an_interface": {
    "key1": {
      "a": 1,
        "b": 2
    },
    "key2": {
      "a": 3,
      "b": 4
    },
    }
    }
    // 生成[key:string]: IKey1。 而不是key1:Ikey1、key2:Ikey2 (会进行自动检测)
    export interface IRootObject {
    should_be_ts_map_not_an_interface: IShouldBeTsMapNotAnInterface;
    }
    export interface IShouldBeTsMapNotAnInterface {
    }
    export interface IKey1 {
    a: number;
    b: number;
    }
  2. 优化自己引用自己代码逻辑