Answer
The ionic compound formed would have the chemical formula $$BaF_2$$
Work Step by Step
The electron configuration of $Ba$ is $$[Xe]6s^2$$
The electron configuration of $F$ is $$1s^22s^22p^5$$
Both of these atoms would tend to lose, gain or share electrons so that it could reach an octet, that is to have 8 valence electrons, or in other words, to achieve the configuration of a noble gas.
$F$ atom lacks only 1 more electron to reach an octet $(2s^22p^6)$, while $Ba$ atom, if loses 2 valence electrons in subshell $6s$, would achieve the configuration of noble gas $Xe$, with 8 valence electrons (an octet).
Therefore, $Ba$ atom is willing to lose 2 electrons, while $F$ atom is only willing to accept 1 electron from $Ba$ atom. The remaining electron that $Ba$ atom must lose to achieve an octet would require another $F$ atom to join in the reaction and gain that electron, so that finally all would reach an octet.
Eventually, there is 1 $Ba$ atom and 2 $F$ atoms involved in the reaction. That means the ionic compound formed would have the chemical formula $$BaF_2$$