@hestia-earth/schema
Version:
HESTIA Schema
21 lines (20 loc) • 926 B
TypeScript
import { SchemaType, NodeType } from '../types';
import { TermTermType } from '../Term';
export declare const jsonldPath: (type: SchemaType | NodeType, id: string) => string;
export declare const isTypeValid: (node: any) => boolean;
export declare const isTypeNode: (type: SchemaType | NodeType) => boolean;
export declare const isTypeBlankNode: (type: SchemaType) => boolean;
export declare const isNode: (node: any) => boolean;
export declare const isBlankNode: (node: any) => boolean;
export declare const isExpandable: (val: any) => any;
export declare const typeToSchemaType: (type?: string) => SchemaType;
export declare const refToSchemaType: (ref?: string) => string | SchemaType;
/**
* Get a list of possible places where the `termType` can be used.
* @param termType The `termType`.
* @returns
*/
export declare const schemaFromTermType: (termType: TermTermType) => {
type: SchemaType;
key: string;
}[];