Type Alias PropsOfKnownPrototype<Tinput, TkeysOptions>
PropsOfKnownPrototype<Tinput, TkeysOptions>: IsAnyOrUnknown<TkeysOptions> extends true ? PropsOfKnownPrototype<Tinput> : IsPropTrue<"nonEnumerables", TkeysOptions> extends true ? (IsPropTrue<"inherited", TkeysOptions> extends true ? (IsPropTrue<"string", TkeysOptions, true> extends true ? PropsOfKnownPrototype_stringNonEnumerablesInherited<Tinput> | ((...
) extends (...
) ? (...
) : (...
)) | ((...
) extends (...
) ? (...
) : (...
)) : never) | (IsPropTrue<"symbol", TkeysOptions> extends true ? PropsOfKnownPrototype_symbolNonEnumerablesInherited<Tinput> : never) : never) | (IsPropTrue<"own", TkeysOptions, true> extends true ? (IsPropTrue<"string", TkeysOptions, true> extends true ? PropsOfKnownPrototype_stringNonEnumerablesOwn<Tinput> : never) | (IsPropTrue<"symbol", TkeysOptions> extends true ? PropsOfKnownPrototype_symbolNonEnumerablesOwn<Tinput> : never) : never) : never
Get the prototype chain's props of
Tinput
, according to theTkeysOptions
passed, so we can exclude them from the instance props.It uses fine-grained props type info, so it can return the right props according to the options: it filters according to
string
,symbol
,nonEnumerables
,inherited
&own
, respecting their defaults as described inKeysOptions
docs.For example, for Arrays, it ends up using:
by respectively calling into:
depending on the options passed.
If a prototype is not known at compile time (eg a custom user class), it returns
never
. Currently, as of TypeScript 5.4, there is no way to get the inherited prototype chain props of a class / instance at compile time