Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
fixed typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Sep 18, 2016
1 parent ba608da commit fed07bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ES5+, support node.js and browsers.
- [thunk.delay(delay)](#thunkdelaydelay)
- [thunk.stop([messagge])](#thunkstopmessagge)
- [thunk.cancel()](#thunkcancel)
- [TypesSript Typings](#typescript-typings)
- [TypeSript Typings](#typescript-typings)
- [What functions are thunkable?](#what-functions-are-thunkable)
- [License MIT](#license)

Expand Down Expand Up @@ -624,15 +624,15 @@ thunk.delay(100)(function () {

This will cancel all control flow process in the current thunk's scope.

## TypesSript Typings
## TypeSript Typings

```typescript
import * as thunks from '../'
const thunk = thunks()

thunk(function * () {
while (true) {
yield <any>function (done) { setTimeout(done, 1000) }
yield function (done) { setTimeout(done, 1000) }
console.log('Dang!')
}
})()
Expand Down Expand Up @@ -668,7 +668,7 @@ thunk()(function () {
console.log(4, err) // 4 [Error: Not thunkable function: function () {}]
})
```
So pay attention to that **we can't return a non-thunkable function** in thunk. If we return a thunkable function, thunk will evaluate it to get a asynchronous value.
So pay attention to that **we can't return a non-thunkable function** in thunk. If we return a thunkable function, thunk will evaluate it as a asynchronous task.

## License
thunks is licensed under the [MIT](https://github.com/thunks/tman/blob/master/LICENSE) license.
Expand Down

0 comments on commit fed07bd

Please sign in to comment.