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
merged 2 commits into from Dec 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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