Ionic compound: The compound which developed the positive charge on a less electronegative substance and a negative charge on a more electronegative substance is called an ionic compound.
The formula of potassium hydride is .
Potassium hydride gives so it is considered an ionic compound.