ox
Version:
Ethereum Standard Library
17 lines (14 loc) • 366 B
text/typescript
import { Bytes, Hex } from 'ox'
import { expectTypeOf, test } from 'vp/test'
test('asserts', () => {
{
const hex = '0x0123456789abcdefABCDEF' as const
Hex.assert(hex)
expectTypeOf(hex).toMatchTypeOf<Hex.Hex>()
}
{
const hex = Bytes.fromHex('0x0123456789abcdefABCDEF')
Hex.assert(hex)
expectTypeOf(hex).toMatchTypeOf<Hex.Hex>()
}
})