Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Adds types for comments in actions array #149

Merged
merged 2 commits into from
Feb 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ export interface NodePlopAPI {
addHelper(name: string, fn: Function): void;
}

export type DynamicActionFunction = (data?: any) => ActionType[]
export type Actions = Array<ActionType | string>
export type DynamicActionFunction = (data?: any) => Actions

export interface PlopGenerator {
/**
Expand All @@ -128,7 +129,7 @@ export interface PlopGenerator {
* If your list of actions needs to be dynamic, take a look at
* [using a dynamic actions array](https://plopjs.com/documentation/#using-a-dynamic-actions-array).
*/
actions: ActionType[] | DynamicActionFunction;
actions: Actions | DynamicActionFunction;
}

export type CustomActionFunction<TData extends object = object> = (
Expand Down