import { assertFunctionIsNotThrowing } from './assertFunctionIsNotThrowing' ; import { assertFunctionIsNotThrowingAsync } from './assertFunctionIsNotThrowingAsync' ; import { assertFunctionIsThrowing } from './assertFunctionIsThrowing' ; import { assertFunctionIsThrowingAsync } from './assertFunctionIsThrowingAsync' ; import { FunctionAssertions } from './FunctionAssertions' ; import { report } from '../../report' ; const getAssertionsForFunction = function ( actual ) : FunctionAssertions { return { throwing < TError extends Error = Error > ( expected ? ) { report ( assertFunctionIsThrowing ( actual , expected ) ) ; } , async throwingAsync < TError extends Error = Error > ( expected ? ) { report ( await assertFunctionIsThrowingAsync ( actual , expected ) ) ; } } ; } ; const getNegatedAssertionsForFunction = function ( actual ) : FunctionAssertions { return { throwing < TError extends Error = Error > ( expected ? ) { report ( assertFunctionIsNotThrowing ( actual , expected ) ) ; } , async throwingAsync < TError extends Error = Error > ( expected ? ) { report ( await assertFunctionIsNotThrowingAsync ( actual , expected ) ) ; } } ; } ; export { getAssertionsForFunction , getNegatedAssertionsForFunction } ;