You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever you inherit from a class (doesn't matter what the parent class contains. And use getter/setter - or even just a getter- you cannot access these functions when passing the object with $ReadOnly
export class SomeThing{
}
class Test extends SomeThing {
get name(): string {
return "test";
}
}
function test(data: $ReadOnly<Test>) {
console.log(data.name)
}
Gives this error:
Error:(28, 22) Cannot get data.name because property name is missing in Test [1].
Removing the inheritance - or removing the $ReadOnly<> modifier makes it work. While i expect it to just work
Flow-bin version: 0.196.3
The text was updated successfully, but these errors were encountered:
Whenever you inherit from a class (doesn't matter what the parent class contains. And use getter/setter - or even just a getter- you cannot access these functions when passing the object with
$ReadOnly
Gives this error:
Removing the inheritance - or removing the
$ReadOnly<>
modifier makes it work. While i expect it to just workFlow-bin version: 0.196.3
The text was updated successfully, but these errors were encountered: