Open
Description
Subject of the issue
If we like to create an object of an interface with a generic default, the property can't be accessed.
Workaround is possible by using createMock<A<string, string>>
Your environment
- ts-auto-mock version: 3.1 (master - branch)
- typescript version: 4.1.3
- node version: v14.15.1
- npm version: v14.15.1
Steps to reproduce
For example:
interface A<T, E = T> {
a: T;
b: E;
}
const myMock: A<string> = createMock<A<string>>();
console.log(myMock.b);
Expected behavior
'b' should be defined and should be of the first passed type. In the example it should be an empty string
Actual behavior
As soon as I try to access 'b', there is an error: "ReferenceError: t is not defined"