TypeScript Version: 3.2.1
Code
See this repository reproducing the issue: https://github.com/AlexGalays/repro-ts-bug-module-duck
Just call yarn and check index.ts.
Expected behavior:
It should compile
Actual behavior:
With the introduction of a cycle in the lib modules (Option.toResult, and Result.toOption)
an Option from the /es folder is no longer compatible with an Option from the /commonjs folder (which is the reference for typings in package.json) even though they are structurally identical.

TypeScript Version: 3.2.1
Code
See this repository reproducing the issue: https://github.com/AlexGalays/repro-ts-bug-module-duck
Just call
yarnand checkindex.ts.Expected behavior:
It should compile
Actual behavior:
With the introduction of a cycle in the lib modules (Option.toResult, and Result.toOption)
an Option from the /es folder is no longer compatible with an Option from the /commonjs folder (which is the reference for typings in package.json) even though they are structurally identical.