assert icon indicating copy to clipboard operation
assert copied to clipboard

A runtime type assertion library.

Results 9 assert issues
Sort by recently updated
recently updated
newest added

In Github, it's hard to read [this](https://github.com/angular/assert/blob/master/API.md) (current) Not so much [this](https://github.com/rodyhaddad/assert/blob/docs/API/API.md) (PR) [](https://reviewable.io/reviews/angular/assert/6)

Reproduction: 1. Checkout https://github.com/angular/templating/tree/18411a1729b1d896593a29c9c11409f0ea6bf2bd 2. In annotations#L37 add the line `assert(obj).is(assert.string, Object)` 3. run `karma start`

Is there an easy way to assert a structure that has some required fields and some optional fields. And have it fail if there are any other unknown fields. This...

There should be a dist file that exports the assert function on window. This is useful if you want to use this library for type assertions with traceur, but don't...

Trying to apply Type Assertions for a function that takes optional arguments. when the optional arguments are not provided, it throws errors. will it be nice if `assert.argumentTypes` check and...

When using `assert.is`, I'm running into a Maximum Call Stack Exceeded RangeError when the value is of type `Document`. All other types work fine. This is because `prettyprint` is seeing...

bug

E.g. the following code would report a type error: ``` static assert(obj) { assert(obj).is(assert.structureOf({ createRootView: Function })); } ``` The real problem was the typo: It needs to be `assert.structure`...

I should be able to require that a value is exactly the type I specify, and expect it to throw if given `null`. ``` javascript var val = null; assert.type(val,...

``` var res:ArrayOfClass = []; ```