How to use the tiny-decoders.lazy function in tiny-decoders

To help you get started, we’ve selected a few tiny-decoders examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lydell / tiny-decoders / typescript / decoders.ts View on Github external
deep([], string);
deep([""], string);
deep([0], string);
// Wrong key type:
// $ExpectError
deep([null], string);
// Wrong order:
// $ExpectError
deep(string, []);
// Missing path:
// $ExpectError
deep(string);

// Decoder instead of `() => decoder`:
// $ExpectError
lazy(string);