{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/react/types.ts"],"names":[],"mappings":"","sourcesContent":["import { FigmaConnectMeta, ConnectedComponent } from '../connect/api'\n\n// Converts our internal type for instances, which adds methods to it,\n// to their underlying primitive type, so they can be used in examples.\n// prettier-ignore\ntype MapType =\n T extends ConnectedComponent ? React.ReactElement :\n // catch functions and return them as is, as they'll otherwise be converted to objects\n T extends Function ? T :\n // Apply recursively to objects and arrays\n T extends object ? { [K in keyof T]: MapType } :\n T extends Array ? MapType[] :\n T\n\nexport type ReactMeta

= FigmaConnectMeta<\n P,\n MapType

,\n React.Component | React.ReactElement | string | ((props: any) => React.ReactElement)\n> & {\n /**\n * A list of import statements that will render in the Code Snippet in Figma.\n * This overrides the auto-generated imports for the component. When this is specified,\n * the `importPaths` option in the config file is also ignored.\n */\n imports?: string[]\n}\n"]}