Skip to content

Commit

Permalink
testing build
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-jonathan committed Jul 21, 2024
1 parent ce465ad commit a0de882
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/behavioral/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*/

import {
Optional,
Optional,
} from '@cosmicmind/foundationjs'

export type Command = {
Expand All @@ -62,29 +62,29 @@ export type HistoryStack = {
}

export class CommandHistory implements HistoryStack {
protected commands: Command[]
protected commands: Command[]

constructor() {
this.commands = []
}
constructor() {
this.commands = []
}

/**
/**
* Adds a command to the commands array.
*
* @param {Command} command - The command to be added.
*
* @return {void}
*/
push(command: Command): void {
this.commands.push(command)
}
push(command: Command): void {
this.commands.push(command)
}

/**
/**
* Removes and returns the last command from the list of commands.
*
* @returns {Optional<Command>} The last command, or undefined if the list is empty.
*/
pop(): Optional<Command> {
return this.commands.pop()
}
pop(): Optional<Command> {
return this.commands.pop()
}
}

0 comments on commit a0de882

Please sign in to comment.