google / intermock

Mocking library to create mock objects with fake data for TypeScript interfaces
https://google.github.io/intermock/
Apache License 2.0
1.14k stars 71 forks source link

Array of alias values mock as empty objects #44

Open jasco opened 4 years ago

jasco commented 4 years ago

File t1.ts

type MyType = string;

interface Data {
    val: MyType;
    arr: MyType[];
}

node build/src/cli/index.js --files t1.ts --interfaces Data -o string

Result:

{
  "Data": {
    "val": "excepturi qui voluptatem",
    "arr": [
      {},
      {},
      {}
    ]
  }
};
abarke commented 2 years ago

I get the same output:

{
  "Data": {
    "val": "quia placeat facilis",
    "arr": [
      {},
      {},
      {},
      {},
      {},
      {}
    ]
  }
};