Skip to content

Docs are wrong: export = and import = require(), says latter is required incorrectly #30976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marcospgp opened this issue Apr 16, 2019 · 3 comments · Fixed by microsoft/TypeScript-Website#2700
Labels
Docs The issue relates to how you learn TypeScript

Comments

@marcospgp
Copy link

The documentation regarding export = and import = require() at https://www.typescriptlang.org/docs/handbook/modules.html is wrong. It says:

When exporting a module using export =, TypeScript-specific import module = require("module") must be used to import the module.

Whereas I've been able to import from and import as for modules that export using export =.

@marcospgp marcospgp changed the title Docs are wrong: Docs are wrong: export = and import = require(), says latter is required but false Apr 16, 2019
@marcospgp marcospgp changed the title Docs are wrong: export = and import = require(), says latter is required but false Docs are wrong: export = and import = require(), says latter is required but that is false Apr 16, 2019
@marcospgp marcospgp changed the title Docs are wrong: export = and import = require(), says latter is required but that is false Docs are wrong: export = and import = require(), says latter is required incorrectly Apr 16, 2019
@RyanCavanaugh RyanCavanaugh added the Docs The issue relates to how you learn TypeScript label Apr 17, 2019
@hiteshvijayhv
Copy link

Can I work on this?

@hiteshvijayhv
Copy link

@marcospgp does it look right?

@marcospgp
Copy link
Author

I'm not sure this is correct as looking back I was using a custom implementation of a TS to JS transpiler. Maybe the docs were actually correct here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs The issue relates to how you learn TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants