diff --git a/src/state/base-state.ts b/src/state/base-state.ts index abcadb2..6e0672a 100644 --- a/src/state/base-state.ts +++ b/src/state/base-state.ts @@ -163,7 +163,7 @@ export class BaseState extends BaseHeadState implements State { * If no name is given, the first action is returned. This is useful for * formats that only supply 1 action, and no name. */ - action(name?: string): Action { + action = any>(name?: string): Action { if (!this.actionInfo.length) { throw new ActionNotFound('This State does not define any actions'); diff --git a/src/state/interface.ts b/src/state/interface.ts index 74fabd4..7231c93 100644 --- a/src/state/interface.ts +++ b/src/state/interface.ts @@ -54,7 +54,7 @@ export type State = { * * If the format provides a default action, the name may be omitted. */ - action(name?: string): Action; + action = any>(name?: string): Action; /** * Returns all actions