type-assert icon indicating copy to clipboard operation
type-assert copied to clipboard

Hack library for converting untyped data to typed data.

Results 7 type-assert issues
Sort by recently updated
recently updated
newest added

fixes #58 fixes #61 Fixes: - Removes unreachable code `UntypedArraySpec`. It was private and the `array` type is impossible to spell (both in the typechecker and in the runtime) anyway....

cla signed

example: ```hack final class A {} class B {} final class C extends B {} function m(): void { require_once __DIR__.'/vendor/autoload.hack'; \Facebook\AutoloadMap\initialize(); echo \Facebook\TypeSpec\of()->toString(); } ``` expected output: `C` actual...

Related: #48, #18 We're expecting to make darray an alias for dict, varray an alias for vec, and swap the backing store for shapes and tuples to dict/vec respectively in...

VarraySpec and DarraySpec are now nearly the same as VecSpec and DictSpec. There are some small differences in the traces that are generated on failure, and there's some redundant logic...

With the current capabilities of TypeAssert, we can derive from `Facebook\TypeSpec\TypeSpec` to implement validation for custom `newtype`s. These specs compose just like the built-in specs. `__Private\from_type_structure()` (and its friends like...