diff --git a/.changeset/long-jars-roll.md b/.changeset/long-jars-roll.md new file mode 100644 index 00000000..9d8380e1 --- /dev/null +++ b/.changeset/long-jars-roll.md @@ -0,0 +1,8 @@ +--- +"node-plop": patch +--- + +Fix types: + +- `AppendActionConfig` and `ModifyActionConfig` - the property `pattern` is now optional` +- `AddManyActionConfig` removed property `path` from options config diff --git a/packages/node-plop/types/index.d.ts b/packages/node-plop/types/index.d.ts index 20c975f8..46b6c43a 100644 --- a/packages/node-plop/types/index.d.ts +++ b/packages/node-plop/types/index.d.ts @@ -235,7 +235,7 @@ export interface AddManyActionConfig AddActionConfig, Exclude< keyof AddActionConfig, - "type" | "templateFile" | "template" | "transform" + "path" | "type" | "templateFile" | "template" | "transform" > > { type: "addMany"; @@ -251,7 +251,7 @@ export interface AddManyActionConfig interface ModifyActionConfigBase extends ActionConfig { type: "modify"; path: string; - pattern: string | RegExp; + pattern?: string | RegExp; transform?: TransformFn; } @@ -260,7 +260,7 @@ export type ModifyActionConfig = ModifyActionConfigBase & TemplateStrOrFile; interface AppendActionConfigBase extends ActionConfig { type: "append"; path: string; - pattern: string | RegExp; + pattern?: string | RegExp; unique: boolean; separator: string; }