Skip to content

Commit

Permalink
fix(docs): use recommended cjs import syntax for ts examples (#1513)
Browse files Browse the repository at this point in the history
  • Loading branch information
mleguen authored and bcoe committed Dec 22, 2019
1 parent 222c8fe commit f9a18bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions docs/typescript.md
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion docs/webpack.md
Expand Up @@ -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());
```
Expand Down

0 comments on commit f9a18bf

Please sign in to comment.