```sh
tsc test.ts --m commonjs
/tmp/test.ts(4,15): error TS2057: Return type of method from exported interface has or is using private type 'Foo'.
```
`cat test.ts`:
```javascript
declare module "test" {
    interface Foo {}
    interface Bar {
        fn(): Foo;
    }

    export = Bar;
}
```