/** * Factory to encode HTML entities. * Creates a no-operation function when `type` is * `'false'`, a function which encodes using named * references when `type` is `'true'`, and a function * which encodes using numbered references when `type` is * `'numbers'`. * * @example * encodeFactory('false')('AT&T') // 'AT&T' * encodeFactory('true')('AT&T') // 'AT&T' * encodeFactory('numbers')('AT&T') // 'ATT&T' * * @param {string} type - Either `'true'`, `'false'`, or * `'numbers'`. * @return {function(string): string} - Function which * takes a value and returns its encoded version. */ export default function encodeFactory(type: string): Function;