I dont know what is the exact differences.
I want to know what is the differences
According to doc https://flow.org/en/docs/types/objects/#toc-exact-object-types {||} is a way to check for “exact” object types => no extra properties will be authorized with type with {||} syntax
{||}
sample from doc
// @flow var foo: {| foo: string |} = { foo: "Hello", bar: "World!" }; // Error!
=> failed because foo can only have a foo property. Bar is unauthorized
but if you do the following it will work
var foo: { foo: string } = { foo: "Hello", bar: "World!" }; // Work
Copyright © 2021 Jogjafile Inc.
According to doc https://flow.org/en/docs/types/objects/#toc-exact-object-types
{||}is a way to check for “exact” object types => no extra properties will be authorized with type with{||}syntaxsample from doc
=> failed because foo can only have a foo property. Bar is unauthorized
but if you do the following it will work