UNPKG

@martijnnieuwenhuizen/generate-component

Version:
20 lines (18 loc) 441 B
/** * Generate a empty prepare function. * * @returns string */ export default () => `import type ComponentInterface from "./interface"; import type { PreparedComponentInterface } from "./interface"; import type { WPPost } from "../../../content/api-interfaces"; export default async function prepare( props: ComponentInterface, page: WPPost ): Promise<PreparedComponentInterface> { return { ...props, }; } `;