It is impossible to define local interface in the function, but you can do it in the module. ``` typescript module A { interface B{} // OK } (function X() { interface Y { } // Error })(); ```