import { createMock } from 'ts-auto-mock' ; import { method , On } from 'ts-auto-mock/extension' ; describe ( 'when creating a mock' , ( ) => { it ( 'should compile when accessing to extended typings' , ( ) => { interface A < T > { a : T ; b : ( ) => { } ; } interface Interface { arrayExpectGenerateMethod : number [ ] ; methodExpectJasmineExtension ( ) : string ; methodReturnMockedType ( ) : A < ( ) => { } > ; } const mock = createMock < Interface > ( ) ; const spy = On ( mock ) . get ( method ( ( x ) => x . methodExpectJasmineExtension ) ) ; spy . and . returnValue ( '' ) ; } ) ; } ) ;