import type * as ts from 'typescript' ; export function InitCore ( typescript , program ) { Object . defineProperty ( _core , 'ts' , { value : typescript } ) ; Object . defineProperty ( _core , 'typeChecker' , { value : program . getTypeChecker ( ) , } ) ; Object . defineProperty ( _core , 'program' , { value : program } ) ; } interface ITsAutoMockCore { ts : typeof ts ; program : ts . Program ; typeChecker : ts . TypeChecker ; } const _core = { get ts ( ) : typeof ts { throw new Error ( 'Core was not initialized' ) ; } , get program ( ) : ts . Program { throw new Error ( 'Core was not initialized' ) ; } , get typeChecker ( ) : ts . TypeChecker { throw new Error ( 'Core was not initialized' ) ; } , } ; export const core = _core ;