/** * [[include:src/codecs/person/README.md]] * * @module codecs/person */ /** * Hello contributor 👋! If you are working on this file, please * endeavor to remove the need for the following `eslint-disable` line 🙏. * Remove the line and run `npx eslint path/to/this/file.ts` to * see which code needs some linting ❤️. * See https://github.com/stencila/encoda/issues/199 for suggestions * on how to refactor code to avoid non-strict boolean expressions. */ import schema from '@stencila/schema'; import * as vfile from '../../util/vfile'; import { Codec } from '../types'; export declare class PersonCodec extends Codec implements Codec { readonly mediaTypes: string[]; readonly extNames: string[]; static regex: RegExp; readonly sniff: (content: string) => Promise; /** * Decode a `VFile` with string content to a `Person`. * * @param file The `VFile` to decode * @returns A promise that resolves to a `Node` */ readonly decode: (file: vfile.VFile | string) => Promise; /** * Encode a `Person` to a `VFile`. * * @param node The `Node` to encode * @returns A promise that resolves to a `VFile` */ readonly encode: (node: schema.Node) => Promise; }