Open maverox opened 6 months ago
I am experiencing this too. I have a custom action that needs a custom parameter command
and I get this TypeScript error during compilation:
plop/plopfile.ts:186:11 - error ts(2353): Object literal may only specify known properties, and 'command' does not exist in type '((answers: PromptProps) => string) | { type: string; path: string; pattern: RegExp; template: string; }'.
@crutchcorn @cspotcode
I see an example like this in the tests: https://github.com/plopjs/plop/blob/202d00dcabb593632da7c9a2aa4f03ce66acff88/packages/node-plop/types/test.ts#L241-L254
Alas, I can't import CustomActionConfig
:
'"plop"' has no exported member named 'CustomActionConfig'. Did you mean 'ActionConfig'?ts(2724)
In plopfile.ts whenever I try to use a plop-pack or a custom action, I get this error
Now I figured that Actions is of type ActionType[] and ActionType is a union of various configs but when a custom type: "value" is found it narrows down to ActionConfig which doesnt have that property and hence it throws this error