Skip to content

Commit

Permalink
feat(typescript): add typescript ambient definition file, close #21
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Mar 15, 2017
1 parent 93cbb24 commit 9ab680b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -201,6 +201,16 @@ This library is fully tested under Node and inside browser environment (CasperJs
I described how one can test asynchronous assertion throwing in your own projects
using Jasmine in [a blog post](http://glebbahmutov.com/blog/testing-async-lazy-assertion/).

## TypeScript

If you use this function from a TypeScript project, we provide ambient type
definition file. Because this is CommonJS library, use it like this

```ts
import la = require('lazy-ass')
// la should have type signature
```

### Small print

Author: Gleb Bahmutov © 2014
Expand Down
2 changes: 2 additions & 0 deletions index.d.ts
@@ -0,0 +1,2 @@
declare function lazyAss(predicate: any, ...args:any[]): void;
export = lazyAss;
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -65,7 +65,8 @@
"index.js",
"index.html",
"bower.json",
"test/demo.js"
"test/demo.js",
"index.d.ts"
],
"homepage": "https://github.com/bahmutov/lazy-ass",
"keywords": [
Expand All @@ -79,6 +80,7 @@
],
"license": "MIT",
"main": "index.js",
"types": "index.d.ts",
"release": {
"verifyConditions": [
{
Expand Down

0 comments on commit 9ab680b

Please sign in to comment.