declare module foo { export function x(): any; } function foo () { } // Legal, because module is ambient