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

How to use figlet on typescript? #31

Closed
MarcosCostaDev opened this issue Jun 8, 2017 · 3 comments
Closed

How to use figlet on typescript? #31

MarcosCostaDev opened this issue Jun 8, 2017 · 3 comments

Comments

@MarcosCostaDev
Copy link

No description provided.

@patorjk
Copy link
Owner

patorjk commented Jun 9, 2017

I'm not that familiar with TypeScript. This is just a regular JavaScirpt library though, so you'd integrate it into your setup the same way you'd integrate any other JavaScript library.

@sridharmallela
Copy link

@marcoslcosta This is how i used figlet into typescript class. Here there is class to print input data with testFiglet method

import * as figlet from 'figlet';

class FigletTest() {

    testFiglet(testData: string) => {
        figlet(testData, (error: any, data: any) => {
            if (error) {
                return process.exit(1);
            }
            console.log(chalk.blue(data));
            console.log('');
            process.exit(0);
        });
    }
}

@MarcosCostaDev
Copy link
Author

@sridharmallela Thank you, I'm going to test this way soon.

@patorjk patorjk closed this as completed Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants