Type Alias IsNestingObject<Tinput>

Returns true if the input value is a NestingObject:

  • an object that is a Many (Array, Set, Map, etc) *
  • And contains other Nested Values (and/or Keys - not just props). For example:
  • Array contains elements
  • Set contains keys
  • Map contains keys/values
  • Iterator, Generator etc contain items they go over / emit (includes Set & Map entries etc)
  • Or a Boxed Primitive (Number, String, Boolean), which is nesting a Primitive value

Therefore, it's not a RealObject or Single or Weak by definition!

Note: this is different to InspectableNested, which is a more strict version of NestingObject (a subset), that only allows objects that can be inspected for their Nested keys/values, WITHOUT affecting the input value itself. Notable distinctions are:

  • Set, Map, Array etc are both NestingObject and InspectableNested
  • SetEntries, Generator, Iterator etc are NestingObject but NOT InspectableNested, cause iterating over them changes them (they can't be restarted).

Type Parameters

  • Tinput