And strictly speaking he was wrong, the trig functions (with appropriate scalling) form a complete orthonormal basis for , and Fourier series theory does not refer to anything outside the interval in the definition of the function space.
(other function and generalised function spaces may be used instead, but the principle is the same, we are only discussing the given interval, if you have a periodic function and its Fourier series is also periodic, when treated as a formal series, is also periodic with the same period then fine you can use that but the development of the theory does not require it)
The functions are only defined on the interval , to consider what they might do outside this interval is irrelevant, they are not defined there.
CB