UNPKG

@antv/t8

Version:

T8 is a text visualization solution for unstructured data within the AntV technology stack, and it is a declarative JSON Schema syntax that can be used to describe the content of data interpretation reports.

21 lines (18 loc) 816 B
import { __assign } from 'tslib'; /** * Creates a factory function for custom block descriptors. * * This function takes a descriptor object and returns a new descriptor with the * `isBlock` property set to `true`. The descriptor is expected to be of type * `BlockDescriptor<CustomBlockSpec>`, where `CustomBlockSpec` is the type of * the block specification. * * @param descriptor - The descriptor object to be converted into a block descriptor. * @returns A new block descriptor with the `isBlock` property set to `true`. */ // eslint-disable-next-line @typescript-eslint/no-explicit-any var createCustomBlockFactory = function (descriptor) { return __assign(__assign({}, descriptor), { isBlock: true }); }; export { createCustomBlockFactory }; //# sourceMappingURL=createCustomBlockFactory.js.map