Fix exporting cheerio module

cheerio is intended to be used as below:

```javascript
var cheerio = require('cheerio'),
    $ = cheerio.load('<h2 class="title">Hello world</h2>');
```

So we should use `import * as cheerio from "cheerio"` in TypeScript.
However, `cheerio` was defined with `export default` in cheerio.d.ts.
This commit is contained in:
rhysd
2015-09-04 17:23:11 +09:00
parent d9fea91e84
commit 365b6ffc7c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
/// <reference path="cheerio.d.ts" />
import cheerio from 'cheerio';
import * as cheerio from 'cheerio';
/*
* LOADING
+1 -1
View File
@@ -262,5 +262,5 @@ interface CheerioAPI extends CheerioSelector {
declare var cheerio:CheerioAPI;
declare module "cheerio" {
export default cheerio;
export = cheerio;
}