0.7.2 • Published 1 year ago

check-dts v0.7.2

Weekly downloads
403
License
MIT
Repository
github
Last release
1 year ago

Check TypeScript Definitions

Unit tests for .d.ts TypeScript definitions in your JavaScript open source library.

It is useful for non-TypeScript project, which wants to provide typing support for TypeScript users and autocompletion for IDE and text editors.

It becomes especially useful for complex types with generics, like we have in Nano Events or Storeon.

// Negative test: test/index.errors.ts
import lib = require('../')

interface Events {
  'set': (a: string, b: number) => void
}
// THROWS Expected 3 arguments, but got 2
lib.on<Events>('set', 2)
// Positive test: test/index.types.ts
import lib = require('../')

interface Events {
  'set': (a: string, b: number) => void
}
lib.on<Events>('set', 'prop', 1)

Docs

Read full docs here.

0.7.2

1 year ago

0.7.1

1 year ago

0.7.0

1 year ago

0.6.7

2 years ago

0.6.6

2 years ago

0.6.5

2 years ago

0.6.4

2 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.4

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago