Skip to content

Commit ef29bf2

Browse files
committed
Improve some comments
1 parent ceac4af commit ef29bf2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/action-common.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ export type FieldsOf<Fs extends readonly StateFeature[]> = Fs extends []
5151
/** Describes the state of an Action that has access to the state corresponding to `Fs`. */
5252
export type ActionState<Fs extends readonly StateFeature[]> = FieldsOf<Fs>;
5353

54-
/** The type of an Action's main entry point. */
54+
/** The type of an Action's main entry point. This is a function that is provided
55+
* with a basic `ActionState` object with features that are always available.
56+
* Each Action can then augment the `state` further if additional features are required.
57+
*/
5558
export type ActionMain = (
5659
state: ActionState<["Logger", "Env", "Actions"]>,
5760
) => Promise<void>;
@@ -64,7 +67,7 @@ export interface Action {
6467
run: ActionMain;
6568
}
6669

67-
/** A generic entry point that sets up the environment for the `action` and runs it. */
70+
/** A generic entry point that sets up the basic environment for the `action` and runs it. */
6871
export async function runInActions(action: Action) {
6972
const startedAt = new Date();
7073
const logger = getActionsLogger();

0 commit comments

Comments
 (0)