import type * as ts from 'typescript' ; import { CustomFunction } from '../matcher/matcher' ; import { getMock } from '../mock/mock' ; import { customFunctionWithTypeArgument } from './helpers/custom-function-with-type-argument' ; export const createHydratedMockCustomFunction = customFunctionWithTypeArgument ( 'create-hydrated-mock.d.ts' , 'createHydratedMock' , ( node , nodeToMock ) : ts . Node => getMock ( node , { nodeToMock , hydrated : true , defaultValues : getDefaultValues ( node ) , } ) ) ; function getDefaultValues ( node ) { return ! ! node . arguments . length ? node . arguments [ 0 ] : undefined ; }