const enum Sizes { Small = 'small' , Medium = 'medium' , Large = 'large' } let selected = Sizes . Small ; function updateSize ( size ) { selected = size ; } updateSize ( Sizes . Large ) ; console . log ( selected ) ;