google/intermock

Throw Error when {[key: string]: string}

Opened this issue · 3 comments

intermock/build/src/lang/ts/intermock.js:47
  throw Error(`Unsupported Primitive type ${syntaxType}`);
  
Error: Unsupported Primitive type 173

the typescript interface is like:

interface Action {
    value: {[key:string]:string};//,<未设置>
    tag: string;//,<未设置>
}

it throw error when meet value.

  1. Ask for new option that allow user set to avoid error, for example, meet unkown type, output {}.
  2. Or support the structure.
Toolo commented

Also experiencing this 👍

Also experiencing this 👍

I dont get any response for a long time, and suggest you to fork and develop it just like me ..

If someone still have this problem, you can try my project mock-type, which is inspired by this project.