eManPrague / frui.ts

Pragmatic MVVM frontend framework
MIT License
14 stars 5 forks source link

Specify Screen name with getter and setter #36

Closed kopecmi8 closed 2 years ago

kopecmi8 commented 3 years ago

I´am using getter to specify ScreenBase name because of localization. After upgrade to Typescript 4.x there is an error beacuse originally its name atributte specified as public member not a getter..

I suggest to change current


@observable name: string;

To something like this

@observable protected nameValue: string;

@computed
get name() {
 return this.nameValue;
}

set name(name: string) {
  this.nameValue = name;
}

Which should be fully compatible and more etensionible

gius commented 2 years ago

Implemented fc50f7cbb119586e335205b3e8f8554c821d32ef