@diplodoc/translation
Version:
markdown translation utilities
28 lines (27 loc) • 1.01 kB
TypeScript
import type { JSONSchema7 } from 'json-schema';
import type { JSONObject } from 'src/json';
import type { ParseOptions, TemplateOptions } from 'src/xliff';
import type { SkeletonOptions } from 'src/skeleton';
type JSONSchema = JSONSchema7 & {
$id: string;
};
type JSONSchemas = {
schemas: JSONSchema[];
};
export type AjvOptions = {
keywords?: string[];
extendWithSchemas?: JSONSchema[];
};
export type AjvConfig = {
ajvOptions?: AjvOptions;
};
export type ExtractOptions = JSONSchemas & TemplateOptions & SkeletonOptions & AjvConfig;
export type ExtractOutput = {
skeleton: JSONObject;
xliff: string;
units: string[];
};
export type ComposeOptions = JSONSchemas & ParseOptions & AjvConfig;
export declare function extract(content: JSONObject, { schemas, source, target, compact, ajvOptions }: ExtractOptions): ExtractOutput;
export declare function compose(skeleton: JSONObject, xliff: string | string[], { schemas, useSource, ajvOptions }: ComposeOptions): JSONObject;
export {};