jshttp / http-assert

assert with status codes
MIT License
151 stars 14 forks source link

enhancement: type definitions should include type predicate #10

Closed reverie closed 3 years ago

reverie commented 4 years ago

It would be nice if assert at least annotated that the value is not undefined.

https://www.typescriptlang.org/docs/handbook/advanced-types.html#using-type-predicates

Gerhut commented 4 years ago

Consider https://github.com/Gerhut/ts-http-assert

dougwilson commented 3 years ago

Type definitions are maintained here: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-assert