What are the ellipsis called in the following Flow code and what do they do?
export type ListTypeNode = {
+kind: 'ListType',
+loc?: Location,
+type: TypeNode,
...
};
This is the new syntax in Flow, that in the future will be indicating, that this object type is inexact (when the regular annotation by default will be exact object annotation).
In a few releases, Flow will begin to treat {foo: number} as an exact object. To indicate inexactness, you must add an ellipsis to the end of an object type: {foo: number, ...}. This new syntax forces the developers to opt into inexactness.
See more details here: https://medium.com/flow-type/on-the-roadmap-exact-objects-by-default-16b72933c5cf
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