当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript terminal.red方法代码示例

本文整理汇总了TypeScript中terminal-kit.terminal.red方法的典型用法代码示例。如果您正苦于以下问题:TypeScript terminal.red方法的具体用法?TypeScript terminal.red怎么用?TypeScript terminal.red使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在terminal-kit.terminal的用法示例。


在下文中一共展示了terminal.red方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: question

 (error: any, result: any) => {
   if (result) {
     term.green("'Yes' detected! Good bye!\n");
   } else {
     term.red("'No' detected, are you sure?\n");
     question();
   }
 }
开发者ID:csrakowski,项目名称:DefinitelyTyped,代码行数:8,代码来源:terminal-kit-tests.ts

示例2: term

  autoComplete as ac,
  getDetectedTerminal,
  ScreenBufferHD,
  ScreenBuffer,
  Terminal
} from "terminal-kit";
import "node";
import * as fs from "fs";

new t.Rect({width: 4, height: 4});
// The term() function simply output a string to stdout, using current style
// output "Hello world!" in default terminal's colors
t.terminal("Hello world!\n");

// This output 'red' in red
term.red("red");

// This output 'bold' in bold
term.bold("bold");

// output 'mixed' using bold, underlined & red, exposing the style-mixing syntax
term.bold.underline.red("mixed");

// printf() style formatting everywhere:
// this will output 'My name is Jack, I'm 32.' in green
term.green("My name is %s, I'm %d.\n", "Jack", 32);

// Since v0.16.x, style markup are supported as a shorthand.
// Those two lines produce the same result.
term("My name is ")
  .red("Jack")(" and I'm ")
开发者ID:csrakowski,项目名称:DefinitelyTyped,代码行数:31,代码来源:terminal-kit-tests.ts


注:本文中的terminal-kit.terminal.red方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。