Home > @microsoft/node-core-library > Terminal

Terminal class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

This class facilitates writing to a console.

Signature:

export declare class Terminal 

Constructors

Constructor Modifiers Description
(constructor)(provider)   (BETA) Constructs a new instance of the Terminal class

Methods

Method Modifiers Description
registerProvider(provider)   (BETA) Subscribe a new terminal provider.
unregisterProvider(provider)   (BETA) Unsubscribe a terminal provider. If the provider isn’t subscribed, this function does nothing.
write(messageParts)   (BETA) Write a generic message to the terminal
writeError(messageParts)   (BETA) Write an error message to the console with red text.
writeErrorLine(messageParts)   (BETA) Write an error message to the console with red text, followed by a newline.
writeLine(messageParts)   (BETA) Write a generic message to the terminal, followed by a newline
writeVerbose(messageParts)   (BETA) Write a verbose-level message.
writeVerboseLine(messageParts)   (BETA) Write a verbose-level message followed by a newline.
writeWarning(messageParts)   (BETA) Write a warning message to the console with yellow text.
writeWarningLine(messageParts)   (BETA) Write a warning message to the console with yellow text, followed by a newline.