Skip to content

Conversation

@rotu
Copy link
Contributor

@rotu rotu commented Feb 8, 2023

Why

Color's constructor previously allowed invalid color names, which fail at runtime with a warning.

What

Now colornames will be checked by typescript and will autocomplete in supporting ides.

E.g. new Color('blu') will fail to typecheck.

Checklist

  • Checked the target branch (current goes master, next goes dev)
  • Added myself to contributors table
  • Ready to be merged

@rotu rotu force-pushed the Typed-color-names branch from bdeab92 to acc545d Compare February 9, 2023 21:45
@joshuaellis joshuaellis requested a review from 0b5vr February 10, 2023 08:14

export { SRGBToLinear } from './ColorManagement';

declare const _colorKeywords: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@0b5vr 0b5vr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@0b5vr 0b5vr added the enhancement New feature or request label Feb 13, 2023
@0b5vr 0b5vr merged commit 3382f01 into three-types:master Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants