improve README

This commit is contained in:
Philipp Kunz 2017-01-20 22:01:10 +01:00
parent e39ad3b19b
commit 8d62fc6ef1

View File

@ -27,9 +27,9 @@ Use TypeScript for best in class instellisense.
import * as q from 'smartq'
let myAsyncFunction = (): Promise<string> => {
let done = q.defer() // returns your typical Deferred object
let done = q.defer<string>() // returns your typical Deferred object
setTimeout(() => {
done.resolve('hi')
done.resolve('hi') // will throw type error for other types than string as argument ;)
},6000)
return done.promise
}