I came across the following code written in js FlowType (I am interested to know the value of + in the context of FlowType not in general JS).
Could you please expla
After some additional research I found out that +/- indicate the covariant or contravariant for a property.
interface MyInterface {
+covariant: number; // read-only
-contravariant: number; // write-only
}
Interesting article on variance:
https://flow.org/en/docs/lang/variance/
https://flow.org/en/docs/types/interfaces/#toc-interface-property-variance-read-only-and-write-only