1.1.4 • Published 7 months ago

@types/color-support v1.1.4

Weekly downloads
50,453
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/color-support

Summary

This package contains type definitions for color-support (https://github.com/isaacs/color-support#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/color-support.

index.d.ts

// Type definitions for color-support 1.1
// Project: https://github.com/isaacs/color-support#readme
// Definitions by: Guketlev Dmitry <https://github.com/Yavanosta>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

/// <reference types="node" />

type ColorSupportLevel = 0 | 1 | 2 | 3;

interface ColorSupportOptions {
    alwaysReturn?: boolean | undefined;
    env?: NodeJS.ProcessEnv | undefined;
    ignoreCI?: boolean | undefined;
    ignoreDumb?: boolean | undefined;
    ignoreTTY?: boolean | undefined;
    level?: ColorSupportLevel | undefined;
    stream?: NodeJS.WriteStream | undefined;
    term?: string | undefined;
}

interface ColorSupportResult {
    level: ColorSupportLevel;
    hasBasic: boolean;
    has256: boolean;
    has16m: boolean;
}

type ColorSupport = (options?: ColorSupportOptions,
                     obj?: ColorSupportResult) => false | ColorSupportResult;

declare var colorSupport: ColorSupport;

export = colorSupport;

Additional Details

  • Last updated: Tue, 06 Jul 2021 18:05:57 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Guketlev Dmitry.

1.1.4

7 months ago

1.1.3

7 months ago

1.1.2

9 months ago

1.1.1

3 years ago

1.1.0

5 years ago