From PR https://github.com/Microsoft/TypeScript/pull/3741
From PR #3741