Skip to content

Commit b0b4d94

Browse files
committed
Export ColorValue and TextAttribute to eliminate the ae-forgotten-export warning
1 parent 01d92eb commit b0b4d94

File tree

3 files changed

+46
-5
lines changed

3 files changed

+46
-5
lines changed

common/reviews/api/node-core-library.api.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,28 @@ declare class Colors {
6161
static yellowBackground(text: string | IColorableSequence): IColorableSequence;
6262
}
6363

64+
// @beta
65+
declare enum ColorValue {
66+
// (undocumented)
67+
Black = 0,
68+
// (undocumented)
69+
Blue = 4,
70+
// (undocumented)
71+
Cyan = 6,
72+
// (undocumented)
73+
Gray = 8,
74+
// (undocumented)
75+
Green = 2,
76+
// (undocumented)
77+
Magenta = 5,
78+
// (undocumented)
79+
Red = 1,
80+
// (undocumented)
81+
White = 7,
82+
// (undocumented)
83+
Yellow = 3
84+
}
85+
6486
// @beta
6587
declare class ConsoleTerminalProvider implements ITerminalProvider {
6688
// (undocumented)
@@ -141,16 +163,12 @@ declare const enum FolderConstants {
141163
interface IColorableSequence {
142164
// (undocumented)
143165
backgroundColor?: ColorValue;
144-
// Warning: (ae-forgotten-export) The symbol "ColorValue" needs to be exported by the entry point index.d.ts
145-
//
146166
// (undocumented)
147167
foregroundColor?: ColorValue;
148168
// (undocumented)
149169
isEol?: boolean;
150170
// (undocumented)
151171
text: string;
152-
// Warning: (ae-forgotten-export) The symbol "TextAttribute" needs to be exported by the entry point index.d.ts
153-
//
154172
// (undocumented)
155173
textAttributes?: TextAttribute[];
156174
}
@@ -532,5 +550,21 @@ declare class Text {
532550
static truncateWithEllipsis(s: string, maximumLength: number): string;
533551
}
534552

553+
// @beta
554+
declare enum TextAttribute {
555+
// (undocumented)
556+
Blink = 3,
557+
// (undocumented)
558+
Bold = 0,
559+
// (undocumented)
560+
Dim = 1,
561+
// (undocumented)
562+
Hidden = 5,
563+
// (undocumented)
564+
InvertColor = 4,
565+
// (undocumented)
566+
Underline = 2
567+
}
568+
535569

536570
```

libraries/node-core-library/src/Terminal/Colors.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const eolSequence: IColorableSequence = {
1717
} as IColorableSequence;
1818

1919
/**
20+
* Colors used with {@link IColorableSequence}.
2021
* @beta
2122
*/
2223
export enum ColorValue {
@@ -31,6 +32,10 @@ export enum ColorValue {
3132
Gray
3233
}
3334

35+
/**
36+
* Text styles used with {@link IColorableSequence}.
37+
* @beta
38+
*/
3439
export enum TextAttribute {
3540
Bold,
3641
Dim,

libraries/node-core-library/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ export { StringBuilder, IStringBuilder } from './StringBuilder';
8282
export { Terminal } from './Terminal/Terminal';
8383
export {
8484
Colors,
85-
IColorableSequence
85+
IColorableSequence,
86+
ColorValue,
87+
TextAttribute
8688
} from './Terminal/Colors';
8789
export {
8890
ITerminalProvider,

0 commit comments

Comments
 (0)