Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printCommands in interface GluegunPrint is missing the optional paramater #584

Open
kaihaase opened this issue Aug 22, 2019 · 2 comments
Open

Comments

@kaihaase
Copy link

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
    ...
}
@amartincastro
Copy link
Contributor

Gave it a shot!

@kaihaase
Copy link
Author

kaihaase commented Oct 2, 2019

@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.

amartincastro added a commit to amartincastro/gluegun that referenced this issue Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants