Utility type that makes a subset of properties in an object type required. Use this when certain properties
in a generally optional object type are known to be present.
For example, the linkshere property in the response from
titles=Main_page&prop=linkshere&lhprop=
will be an array of empty objects because lhprop= is left empty. However, specifying
lhprop=pageid
guarantees that each object will contain a pageid property. In such cases, you can do:
Utility type that makes a subset of properties in an object type required. Use this when certain properties in a generally optional object type are known to be present.
For example, the
linkshere
property in the response from titles=Main_page&prop=linkshere&lhprop= will be an array of empty objects becauselhprop=
is left empty. However, specifying lhprop=pageid guarantees that each object will contain apageid
property. In such cases, you can do:This creates a type where the
pageid
property is non-optional, without modifying the rest of the type.