Skip to content
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

fix(docs): use recommended cjs import syntax for ts examples #1513

merged 2 commits into from
Dec 22, 2019


Copy link

@mleguen mleguen commented Dec 11, 2019

Fix typescript examples to use the right import syntax for a commonjs module such as yargs.

See explanation in typescript documentation here:

Both CommonJS and AMD generally have the concept of an exports object which contains all exports from a module.


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

Copy link
Member Author

mleguen commented Dec 11, 2019

Closes #1511

Copy link
Member Author

mleguen commented Dec 11, 2019

Closes #1455

Copy link

lf- commented Dec 18, 2019

@mleguen you have to put the "closes" in the initial PR message for GitHub to recognize it (you'll see an underline under "closes" when it's right)

@bcoe bcoe merged commit f9a18bf into master Dec 22, 2019
@bcoe bcoe deleted the fix/1511-recommended-typescript-import branch December 22, 2019 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants