type ColorExtend = Record<string, string|{open:string, close:string}>
declare const ansis: Ansis;
interface Ansis {
  (string: string | TemplateStringsArray): string;
  ansi256: (code: number) => this;
  ansi: (code: number) => this;
  fg: (code: number) => this;
  bgAnsi256: (code: number) => this;
  bgAnsi: (code: number) => this;
  bg: (code: number) => this;
  rgb: (red: number, green: number, blue: number) => this;
  hex: (color: string) => this;
  bgRgb: (red: number, green: number, blue: number) => this;
  bgHex: (color: string) => this;
  strip: (string: string) => string;
  extend: (colors: ColorExtend) => void;
  readonly open: string;
  readonly close: string;
  readonly reset: this;
  readonly inverse: this;
  readonly hidden: this;
  readonly visible: this;
  readonly bold: this;
  readonly dim: this;
  readonly faint: this;
  readonly italic: this;
  readonly underline: this;
  readonly doubleUnderline: this;
  readonly overline: this;
  readonly strikethrough: this;
  readonly strike: this;
  readonly frame: this;
  readonly encircle: this;
  readonly black: this;
  readonly red: this;
  readonly green: this;
  readonly yellow: this;
  readonly blue: this;
  readonly magenta: this;
  readonly cyan: this;
  readonly white: this;
  readonly gray: this;
  readonly grey: this;
  readonly blackBright: this;
  readonly redBright: this;
  readonly greenBright: this;
  readonly yellowBright: this;
  readonly blueBright: this;
  readonly magentaBright: this;
  readonly cyanBright: this;
  readonly whiteBright: this;
  readonly bgBlack: this;
  readonly bgRed: this;
  readonly bgGreen: this;
  readonly bgYellow: this;
  readonly bgBlue: this;
  readonly bgMagenta: this;
  readonly bgCyan: this;
  readonly bgWhite: this;
  readonly bgGray: this;
  readonly bgBlackBright: this;
  readonly bgRedBright: this;
  readonly bgGreenBright: this;
  readonly bgYellowBright: this;
  readonly bgBlueBright: this;
  readonly bgMagentaBright: this;
  readonly bgCyanBright: this;
  readonly bgWhiteBright: this;
}
declare const Ansis: new (str: string) => Ansis;
type AnsiStyles = (
  | 'reset'
  | 'inverse'
  | 'hidden'
  | 'visible'
  | 'bold'
  | 'dim'
  | 'faint'
  | 'italic'
  | 'underline'
  | 'doubleUnderline'
  | 'overline'
  | 'strikethrough'
  | 'strike'
  | 'frame'
  | 'encircle'
  );
type AnsiColors = (
  | 'black'
  | 'red'
  | 'green'
  | 'yellow'
  | 'blue'
  | 'magenta'
  | 'cyan'
  | 'white'
  | 'gray'
  | 'grey'
  | 'blackBright'
  | 'redBright'
  | 'greenBright'
  | 'yellowBright'
  | 'blueBright'
  | 'magentaBright'
  | 'cyanBright'
  | 'whiteBright'
  | 'bgBlack'
  | 'bgRed'
  | 'bgGreen'
  | 'bgYellow'
  | 'bgBlue'
  | 'bgMagenta'
  | 'bgCyan'
  | 'bgWhite'
  | 'bgGray'
  | 'bgBlackBright'
  | 'bgRedBright'
  | 'bgGreenBright'
  | 'bgYellowBright'
  | 'bgBlueBright'
  | 'bgMagentaBright'
  | 'bgCyanBright'
  | 'bgWhiteBright'
  );
type StringUnion<T, B extends string> = T | (B & Record<never, never>);
type AnsiColorsExtend<T extends string> = StringUnion<AnsiColors, T>;

export { AnsiColors, AnsiColorsExtend, AnsiStyles, Ansis, ansis as default };
