Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add index.ts.d #25

Open
morlay opened this issue Nov 29, 2016 · 0 comments
Open

add index.ts.d #25

morlay opened this issue Nov 29, 2016 · 0 comments

Comments

@morlay
Copy link

morlay commented Nov 29, 2016

index.ts.d

    type Adjusters = 'red' | 'green' | 'blue' | 'alpha' | 'a' // RGBA
        | 'hue' | 'h' | 'saturation' | 's' | 'lightness' | 'l' | 'whiteness' | 'w' | 'blackness' | 'b' // HSLWB;
        | 'blend' | 'tint' | 'shade' | 'contrast'

    interface Modifier {
        type: 'modifier';
        value: string;
    }

    interface Number {
        type: 'number';
        value: string;
    }

    interface Color {
        type: 'color';
        value: string;
    }

    interface Adjuster {
        type: 'function';
        name: Adjusters;
        arguments: Array<Modifier | Number | ColorFunction>;
    }

    interface ColorFunction {
        type: 'function';
        name: 'color';
        arguments: Array<Color | Adjuster>
    }

    export function convert(val: string): string

    export function parse(val: string): ColorFunction | Modifier | Number | Adjuster

Just manual types. not sure is this enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant