Create command pattern with TypeScript