-
Notifications
You must be signed in to change notification settings - Fork 26
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
Working TypeScript type definitions for both default and module imports #62
base: master
Are you sure you want to change the base?
Conversation
The types in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahocevar so much work is done! I wonder what really stops us from maintaining a separate package? I really want to remove all comments and tooling from code. I believe it must be self-explanatory.
What's the main reason we are not doing @types/color-space?
I really don't want to deal with typescript in this package, I am sorry. |
You'll see it won't get easier with |
It would have been a more pleasant contributing experience if that would have been clear from the start. Looking at #57, where @MoonE suggested going that route, that didn't seem to satisfy you either. At least nothing was done on your end to complete or support the effort. Now you've wasted both @MoonE's and my time. Time that would have been spent better contributing to other packages out there that gives us the features of color-space and color-rgba we need in https://github.com/openlayers/openlayers. Very disappointed. |
@ahocevar I wasn't sure about that from the beginning, I hoped it could be kept clean and simple, like a single separate Eg. the code style I aspire for is: import rgb from './rgb.js';
const cmy = {
name: 'cmy',
min: [0, 0, 0],
max: [100, 100, 100],
channel: ['cyan', 'magenta', 'yellow'],
alias: ['CMY']
};
cmy.rgb = ([c, m, y]) => [
(1 - c/100) * 255,
(1 - m/100) * 255,
(1 - y/100) * 255
];
rgb.cmy = ([r, g, b]) => [
(1-r/255) * 100 || 0,
(1-g/255) * 100 || 0,
(1-b/255) * 100 || 0
];
export default cmy; It is minimal and self-explanatory. There's nothing to take away, which is (one of) definition of perfection. I am sorry you spent your time - believe it or not I also sacrificed hours on that, and I have other projects to focus on. One thing I don't understand yet - what makes you want to contribute here instead of @types/color-space? It seems #57 has half the job done. I can try doing it later. |
Fixes #46