core/source/logic/check_kinds/_base.ts

60 lines
789 B
TypeScript
Raw Permalink Normal View History

2023-08-03 08:34:33 +02:00
namespace _heimdall.check_kinds
{
/**
*/
export type type_check_kind = {
parameters_schema : (
()
=>
_heimdall.helpers.json_schema.type_schema
);
normalize_order_node : (
(node : any)
=>
any
);
run : (
(parameters)
=>
Promise<_heimdall.type_result>
);
};
/**
*/
var _implementations : Record<string, type_check_kind> = {};
/**
*/
export function register_implementation(
name : string,
check_kind : type_check_kind
) : void
{
_implementations[name] = check_kind;
}
/**
*/
export function get_implementation(
name : string
) : type_check_kind
{
return _implementations[name];
}
/**
*/
export function get_implementations(
) : Record<string, type_check_kind>
{
return _implementations;
}
}