diff --git a/docs/typescript.md b/docs/typescript.md index 36ef4a2a8..5baf9b8f1 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -7,9 +7,7 @@ The following `.options()` definition: ```typescript #!/usr/bin/env node -import * as yargs from 'yargs'; -// or with the "esModuleInterop" compiler option set to "true": -// import yargs from 'yargs'; +import yargs = require('yargs'); const argv = yargs.options({ a: { type: 'boolean', default: false }, diff --git a/docs/webpack.md b/docs/webpack.md index b665b5331..012a846e0 100644 --- a/docs/webpack.md +++ b/docs/webpack.md @@ -23,7 +23,7 @@ console.log(yargs.parse()) Or for typescript users, `src/index.ts`: ```ts -import * as yargs from 'yargs'; +import yargs = require('yargs'); console.log(yargs.parse()); ```