Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Refact enum property name #65

Open
StevenWatremez opened this issue Mar 28, 2018 · 1 comment
Open

Refact enum property name #65

StevenWatremez opened this issue Mar 28, 2018 · 1 comment

Comments

@StevenWatremez
Copy link
Contributor

Currently enums have Enum suffix. This issue is about removing Suffix on Enum types and adding rawValue suffix.

// Before
var toto: String
var totoEnum: Toto { /*…*/ }

// After
var totoRawValue: String
var toto: Toto { /*…*/ }
@StevenWatremez
Copy link
Contributor Author

We could provide migration templates (in 2 steps?) with Deprecated attributes to help renaming.

// Migration template 1
var totoRawValue: String
@available(*, deprecated, renamed: "totoRawValue")
var toto: String { return totoRawValue }
var totoEnum: Toto { /* … */ }
// Migration template 2
var totoRawValue: String
var toto: Toto { /* … */ }
@available(*, deprecated, renamed: "toto")
var totoEnum: Toto { return toto }

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

No branches or pull requests

1 participant