Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { instanceOf } from 'decoders';
// $ExpectType Decoder
instanceOf(Error);
// $ExpectType Decoder
instanceOf(TypeError);
// $ExpectType Decoder
instanceOf(RegExp);
// $ExpectType Decoder, unknown>
instanceOf>(Promise);
// $ExpectError
instanceOf>(Set);
import { instanceOf } from 'decoders';
// $ExpectType Decoder
instanceOf(Error);
// $ExpectType Decoder
instanceOf(TypeError);
// $ExpectType Decoder
instanceOf(RegExp);
// $ExpectType Decoder, unknown>
instanceOf>(Promise);
// $ExpectError
instanceOf>(Set);
import { instanceOf } from 'decoders';
// $ExpectType Decoder
instanceOf(Error);
// $ExpectType Decoder
instanceOf(TypeError);
// $ExpectType Decoder
instanceOf(RegExp);
// $ExpectType Decoder, unknown>
instanceOf>(Promise);
// $ExpectError
instanceOf>(Set);
import { instanceOf } from 'decoders';
// $ExpectType Decoder
instanceOf(Error);
// $ExpectType Decoder
instanceOf(TypeError);
// $ExpectType Decoder
instanceOf(RegExp);
// $ExpectType Decoder, unknown>
instanceOf>(Promise);
// $ExpectError
instanceOf>(Set);
import { instanceOf } from 'decoders';
// $ExpectType Decoder
instanceOf(Error);
// $ExpectType Decoder
instanceOf(TypeError);
// $ExpectType Decoder
instanceOf(RegExp);
// $ExpectType Decoder, unknown>
instanceOf>(Promise);
// $ExpectError
instanceOf>(Set);
a7: tuple6(hardcoded('foo'), mixed, null_, undefined_, unknown, truthy),
a8: tuple4(integer, number, positiveInteger, positiveNumber),
a9: either(boolean, numericBoolean),
b0: map(
compose(
string,
predicate(s => s.startsWith('x'), 'Must start with x')
),
s => s.toUpperCase()
),
b1: shape,
b2: date,
b3: dict(string),
b4: mapping(string),
b5: oneOf(['foo', 'bar']),
b6: instanceOf(TypeError),
}),
{ style: 'simple' }
)('blah');