Closed wmonk closed 6 years ago
I think we should think about how to represent when schema types don't have additionalProperties
set. I think this technically makes a type like:
type Resource = {
foo: string
} & {
[key: string]: any
}
Maybe this should be a strict
option when parsing the schema.
Although I suppose that's what object types already represent, which is why exact syntax exists 🤔
I don't think the above makes sense:
1) The absence of additionalProperties
defaults to True
(as you've implemented)
2) Flow object types by default allow additional properties, i.e. they act like the schema definitions. I therefore don't think we need the union. As you say, we just need to special case the additionalProperties: false
=> exact syntax.
eslint
setup to be simpler$exact
property to flow schema generation@babel/types
&@babel/generator
to enableexact
objects