File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { type ColorSpace , getColorSpace } from "./supports" ;
2
2
import { ansi256To16 , hexToRgb , rgbToAnsi16 , rgbToAnsi256 } from "./utils" ;
3
3
4
- type FarveFn < T = string | boolean | number | null | undefined | void > = (
5
- text : T ,
6
- ) => T ;
4
+ type FarveFn = (
5
+ text : string | boolean | number | null | undefined ,
6
+ ) => string ;
7
7
8
8
export interface FastFarver {
9
9
// modifiers
Original file line number Diff line number Diff line change 1
1
import { type ColorSpace , getColorSpace } from "./supports" ;
2
2
import { ansi256To16 , hexToRgb , rgbToAnsi16 , rgbToAnsi256 } from "./utils" ;
3
3
4
- export type Farve < T = string | boolean | number | null | undefined | void > = (
5
- text : T ,
6
- ) => T ;
4
+ export type Farve = (
5
+ text : string | boolean | number | null | undefined ,
6
+ ) => string ;
7
7
8
8
interface Farver {
9
9
// modifiers
@@ -73,7 +73,7 @@ function createWrap(colorSpace: ColorSpace, colors: Farver) {
73
73
end : number | string ,
74
74
) : ChainedFarve {
75
75
if ( ! enabled ) {
76
- return chain ( ( text ) => text , colors ) as ChainedFarve ;
76
+ return chain ( ( text ) => ` ${ text } ` , colors ) as ChainedFarve ;
77
77
}
78
78
return chain ( ( text ) => {
79
79
if ( typeof text !== "string" ) {
You can’t perform that action at this time.
0 commit comments