UNPKG

babel-plugin-i18next-extract

Version:

Statically extract translation keys from i18next application.

14 lines (13 loc) 565 B
import * as BabelCore from "@babel/core"; import * as BabelTypes from "@babel/types"; import { CommentHint } from "../comments"; import { Config } from "../config"; import { ExtractedKey } from "../keys"; /** * Extract custom Trans components. * * @param path: node path of potential custom Trans JSX element. * @param config: plugin configuration * @param commentHints: parsed comment hints */ export default function extractCustomTransComponent(path: BabelCore.NodePath<BabelTypes.JSXElement>, config: Config, commentHints?: CommentHint[]): ExtractedKey[];