Add type definitions for TypeScript projects
Are there any plans to add type definitions so TypeScript projects can use this library?
Right now I can only manually figure out types for everything I need:
import templateBuilder, { TemplateBuilderOptions } from 'babel__template';
import { ParserPlugin } from '@babel/parser';
type SVGRProps = {
componentName: ...;
props: ...;
imports: ...;
interfaces: ...;
jsx: ...;
};
const customTemplate = (
{ template }: { template: typeof templateBuilder },
_opts: TemplateBuilderOptions,
{ componentName, jsx }: SVGRProps
) => {
const plugins: ParserPlugin[] = ['typescript'];
const typeScriptTpl = template.smart({ plugins });
// ...my custom template
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I don't think this has a fix (or answer) yet? Should probably be kept open
Hello, yes it is planned to add TypeScript definitions to this project. Since I am not a power TypeScript user, help is welcome here!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.