Skip to content

Commit

Permalink
docs(command): fix options type in action handler example's (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Jul 2, 2020
1 parent 738a6ea commit d661cc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/command/README.md
Expand Up @@ -491,7 +491,7 @@ await new Command()
.command( 'clone', new Command()
.arguments( '<source:string> [destination:string]' )
.description( 'Clone a repository into a newly created directory.' )
.action( ( source: string, destination: string ) => {
.action( ( options: any, source: string, destination: string ) => {
console.log( 'clone command called' );
} ) )
.parse( Deno.args );
Expand All @@ -505,7 +505,7 @@ import { Command } from 'https://deno.land/x/cliffy/command.ts';
await new Command()
.command( 'clone <source:string> [destination:string]' )
.description( 'Clone a repository into a newly created directory.' )
.action( ( source: string, destination: string ) => {
.action( ( options: any, source: string, destination: string ) => {
console.log( 'clone command called' );
} )
.parse( Deno.args );
Expand Down Expand Up @@ -550,7 +550,7 @@ import { Command } from 'https://deno.land/x/cliffy/command.ts';
await new Command()
.version( '0.1.0' )
.command( 'rmdir <dirs...>' )
.action( ( options: IFlags, dirs: string[] ) => {
.action( ( options: any, dirs: string[] ) => {
dirs.forEach( ( dir: string ) => {
console.log( 'rmdir %s', dir );
} );
Expand All @@ -575,7 +575,7 @@ import { Command } from 'https://deno.land/x/cliffy/command.ts';
await new Command()
.command( 'rm <dir>' )
.option( '-r, --recursive [recursive:boolean]', 'Remove recursively' )
.action( ( { recursive }: IFlags, dir: string ) => {
.action( ( { recursive }: any, dir: string ) => {
console.log( 'remove ' + dir + ( recursive ? ' recursively' : '' ) );
} )
.parse( Deno.args );
Expand Down

0 comments on commit d661cc4

Please sign in to comment.