diff --git a/docs/DETAILS.md b/docs/DETAILS.md index 80a732f2a..f92fc59fe 100644 --- a/docs/DETAILS.md +++ b/docs/DETAILS.md @@ -245,4 +245,29 @@ const mockType = createMock Test>(); const mock = new mockType(); mock = // { a: "" } -``` \ No newline at end of file +``` + +## TypeQuery +```ts +enum AnEnum { + a, + b = 'something', +} + +const mock = createMock(); +mock.a // 0 +mock.b // 'something' +mock[0] // 'a' + +class AClass { + a: string +} + +const mockClass = createMock(); +new mockClass().a // '' + +function AFunction(): number; + +const mockFunction = createMock(); +mockFunction() // 0 +``` diff --git a/docs/NOT_SUPPORTED.md b/docs/NOT_SUPPORTED.md index 1a0a1808c..c4a365f80 100644 --- a/docs/NOT_SUPPORTED.md +++ b/docs/NOT_SUPPORTED.md @@ -32,22 +32,3 @@ const mock = createMock(); mock.conditional // should be string. It will be null ``` - -## TypeQuery -[bug](https://github.com/uittorio/ts-auto-mock/issues/91) - -This scenario needs to be investigated -```ts -enum AnEnum { - a, - b, -} -interface Test { - type: typeof AnEnum -} - -const mock = createMock(); -mock.type // will be null -``` - -