  Magnetars are young, highly magnetized neutron stars that are associated with
magnetar short bursts (MSBs), magnetar giant flares (MGFs), and at least a part
of fast radio bursts (FRBs). In this work, we consider that a magnetar and a
main sequence star are in a binary system and analyze the properties of the
electromagnetic signals generated by the interaction between the magnetar
bursts and the companion star. During the pre-burst period, the persistent
radiation could be generated by the interaction between the $e^+e^-$-pair wind
from the magnetar and the companion or its stellar wind. We find that for a
newborn magnetar, the pre-burst persistent radiation from the strong magnetar
wind can be dominant, and it is mainly at the optical and ultraviolet (UV)
bands. For relatively older magnetars, the reemission from a burst interacting
with the companion is larger than the pre-burst persistent radiation and the
luminosity of the companion itself. The transient reemission produced by the
heating process has a duration of $0.1 - 10^5 {\rm~s}$ at the optical, UV, and
X-ray bands. Additionally, we find that if these phenomena occur in nearby
galaxies within a few hundred kiloparsecs, they could be detected by current or
future optical telescopes.
