Skip to content

Conversation

@elchininet
Copy link
Owner

The enum values types were using the enums' keys just because the keys and the values were the same, but it is better to get the string representation of the enums that returns the exact values.

Enum

enum Mode {
    combined = 'combined',
    override = 'override',
    diff = 'diff'
}

Enum values

// Before
type ModeValues = keyof typeof Mode; // 'combined' | 'override' | 'diff'

// After
type ModeValues = `${Mode}`; // 'combined' | 'override' | 'diff'

@coveralls
Copy link

Coverage Status

coverage: 100.0%. remained the same
when pulling 753cb51 on change_values_types
into bb59cce on master.

@elchininet elchininet merged commit 3558aae into master Dec 28, 2023
@elchininet elchininet deleted the change_values_types branch December 28, 2023 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants