gluegun icon indicating copy to clipboard operation
gluegun copied to clipboard

printCommands in interface GluegunPrint is missing the optional paramater

Open kaihaase opened this issue 5 years ago • 2 comments

The definition of printCommands in GluegunPrint interface is wrong:

src/toolbox/print-types.ts

export interface GluegunPrint {
    ...
    printCommands(toolbox: GluegunToolbox): void;
    ...
}

It should be:

src/toolbox/print-types.ts

export interface GluegunPrint {
    ...
    printCommands(toolbox: Toolbox, commandRoot?: string[]): void
    ...
}

kaihaase avatar Aug 22 '19 05:08 kaihaase

Gave it a shot!

amartincastro avatar Oct 01 '19 17:10 amartincastro

@amartincastro I'm sorry, it's my fault.

Either the class Toolbox has to be imported: import { Toolbox } from '../domain/toolbox' or use the interface GluegunToolbox instead of the class Toolbox:

export interface GluegunPrint {
    ...
    printCommands(toolbox: GluegunToolbox, commandRoot?: string[]): void
    ...
}

More correct would probably be to import Toolbox, since the class is also used in print-tools.ts.

After the change, the tests should run without errors.

kaihaase avatar Oct 02 '19 07:10 kaihaase