import { BlockContent, Entity, InlineContent, Node, TypeMap, Types, Unions } from '../types';
export declare type TypeMapGeneric<T extends {
    type: Entity['type'];
} & Record<string, Node> = {
    type: Entity['type'];
}> = {
    [key in T['type']]: key;
};
declare type ExtractGeneric<Type> = Type extends TypeMap<infer X> ? X : Type extends TypeMapGeneric<infer Y> ? Y : never;
/**
 * Type guard to determine whether a node belongs to a type map
 *
 * @template {TypeMap} T
 * @param {T} typeMap
 * @param {Node} node A Stencila schema node object
 */
export declare const isInTypeMap: <T extends Partial<TypeMap<Entity> | TypeMapGeneric<{
    type: Entity['type'];
}>>>(typeMap: T) => (node?: unknown) => node is ExtractGeneric<T>;
/**
 * Type guard to determine whether a node is a primitive type
 * (i.e. not an `Entity`).
 */
export declare const isPrimitive: (node?: unknown) => node is string | number | boolean | null;
/**
 * Type guard to determine whether a node is an `Entity`
 */
export declare const isEntity: (node?: unknown) => node is Entity;
/**
 * A type guard to determine whether a node is of a specific type.
 *
 * e.g. `isA('Paragraph', node)`
 */
export declare const isA: <K extends keyof Types>(type: K, node: unknown) => node is Types[K];
/**
 * Returns a type guard to determine whether a node is of a specific type.
 *
 * e.g. `isType('Article')(node)`
 * e.g. `article.content.filter(isType('Paragraph'))`
 */
export declare const isType: <K extends keyof Types>(type: K) => (node?: unknown) => node is Types[K];
/**
 * A type guard to determine whether a node is a member of a union type.
 *
 * e.g. `isIn('MediaObjectTypes', node)`
 */
export declare const isIn: <K extends keyof Unions>(union: K, node: unknown) => node is Unions[K];
/**
 * Returns a type guard to determine whether a node is a member of a union type.
 *
 * e.g. `isMember('CreativeWorkTypes')(node)`
 */
export declare const isMember: <K extends keyof Unions>(type: K) => (node?: unknown) => node is Unions[K];
/**
 * Type guard to determine whether a node is `InlineContent`.
 *
 * e.g. `nodes.filter(isInlineContent)`
 */
export declare const isInlineContent: (node?: unknown) => node is InlineContent;
/**
 * Type guard to determine whether a node is `BlockContent`.
 *
 * e.g. `nodes.filter(isBlockContent)`
 */
export declare const isBlockContent: (node?: unknown) => node is BlockContent;
export {};
