Revert back to original

This commit is contained in:
katsanva
2019-01-25 21:39:01 +04:00
parent b4cde2a928
commit da28a84b5e
7 changed files with 10 additions and 8 deletions

View File

@@ -42,7 +42,7 @@ declare class Rect {
): void;
}
export default Rect;
export = Rect;
declare namespace Rect {
type Options = AbsoluteOptions | Region;

View File

@@ -83,7 +83,7 @@ declare class ScreenBuffer extends NextGenEvents {
saveSync(filepath: string): void;
}
export default ScreenBuffer;
export = ScreenBuffer;
declare namespace ScreenBuffer {
interface Options {

View File

@@ -37,7 +37,7 @@ declare class ScreenBufferHD extends ScreenBuffer {
): void;
}
export default ScreenBufferHD;
export = ScreenBufferHD;
declare namespace ScreenBufferHD {
interface Attributes {

View File

@@ -3,7 +3,7 @@ import EventEmitter = require("nextgen-events");
type Terminal = Terminal.Impl & EventEmitter;
export default Terminal;
export = Terminal;
type Callback<T> = ((err: any) => void) | ((err: undefined, arg: T) => void);

View File

@@ -77,7 +77,7 @@ declare class TextBuffer {
save(filepath: string, callback: (error?: any) => void): void;
}
export default TextBuffer;
export = TextBuffer;
declare namespace TextBuffer {
interface Options {

View File

@@ -1,5 +1,5 @@
// Require the lib, get a working terminal
import {
import t, {
terminal as term,
autoComplete as ac,
getDetectedTerminal,
@@ -10,9 +10,10 @@ import {
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
term("Hello world!\n");
t.terminal("Hello world!\n");
// This output 'red' in red
term.red("red");
@@ -408,7 +409,7 @@ term("My name is ")
.green("32\n");
term("My name is ^rJack^ and I'm ^g32\n");
getDetectedTerminal((error, term) => {
getDetectedTerminal((error: any, term: any) => {
term.cyan("Terminal name: %s\n", term.appName);
term.cyan("Terminal app: %s\n", term.app);
term.cyan("Terminal generic: %s\n", term.generic);

View File

@@ -5,6 +5,7 @@
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"esModuleInterop": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],