isCompound

This commit is contained in:
Tony Garnock-Jones 2021-03-17 14:24:41 +01:00
parent 05c7343983
commit ca42ffe832
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,8 @@
import type { Compound, Value } from "./values";
import type { DefaultPointer } from "./pointer";
import { Dictionary, Set } from "./dictionary";
export function isCompound<T = DefaultPointer>(x: Value<T>): x is Compound<T>
{
return (Array.isArray(x) || Set.isSet(x) || Dictionary.isDictionary(x));
}

View File

@ -1,6 +1,7 @@
export * from './annotated';
export * from './bytes';
export * from './codec';
export * from './compound';
export * from './decoder';
export * from './dictionary';
export * from './encoder';