/** * [[include:src/codecs/dmagic/README.md]] * * @module codecs/dmagic */ import schema from '@stencila/schema'; import * as vfile from '../../util/vfile'; import { Codec, CommonEncodeOptions } from '../types'; export declare class DMagicCodec extends Codec implements Codec { /** * The media types that this codec can decode/encode. */ readonly mediaTypes: string[]; /** * The file name extensions to register for the codec. * Used to be able to explicitly refer to this codec. */ readonly extNames: string[]; /** * Decode a `VFile` with `demo-magic.sh` content to a Stencila `Node`. * * @param file The `VFile` to decode * @returns A promise that resolves to a Stencila `Node` */ readonly decode: () => Promise; /** * Encode a Stencila `Node` to a `VFile` with `demo-magic.sh` content. * * By default bundles the Demo Magic script into the generated file. * * @param thing The Stencila `Node` to encode * @returns A promise that resolves to a `VFile` */ readonly encode: (node: schema.Node, options?: CommonEncodeOptions) => Promise; }