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 explain me what does the +
symbol mean in front of the property in the code below:
export type User = {
+name: string,
+surname: string,
+personId: PourceId,
}
I could not find any reference in the documentation, any link is also welcome.
The +
symbol in front of the property means the property is read-only
Reference: https://flow.org/en/docs/types/interfaces/#toc-interface-property-variance-read-only-and-write-only
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With