Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
styling, remove typescript part
Browse files Browse the repository at this point in the history
  • Loading branch information
huan committed Sep 25, 2017
1 parent fad95fd commit 586993b
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,33 +454,23 @@ const main = async () {
--------------------------------------------------------

<a name="import"></a>
ES6 Import and Typing(for TypeScript)
-------------------------------------
ES6 Import
----------

We have two ways to import(require) the levelup module in the code.

### 1. The old fashioned `require`
### 1. By using `require`

```js
var levelup = require('levelup')
```

### 2. The new ES6 `import`
### 2. By using ES6 `import`

```js
import levelup from 'levelup'
```

## TypeScript

LevelUp ships with TypeScript `type definitions` support out-of-box. So we can use `import` with Type Defination by default.

The benefits will be:
1. [Static Type Checking](http://2ality.com/2014/10/typed-javascript.html)
1. [IDE IntelliSense](https://code.visualstudio.com/docs/editor/intellisense)

Recommended IDE: [Visual Studio Code](https://code.visualstudio.com/)

--------------------------------------------------------

<a name="events"></a>
Expand Down

0 comments on commit 586993b

Please sign in to comment.