-
In the below example, type CustomFieldValues = {
name: {
first: string;
last: string;
aliases: NestedValue<string[]>;
};
age: number;
friends: NestedValue<string[]>;
}
// Normal `FieldPath`
// Result: "name" | "age" | "friends" | "name.first" | "name.last" | "name.aliases" | `name.aliases.${number}` | `friends.${number}`
type CustomFieldPath = FieldPath<CustomFieldValues>;
// Desired `AbsoluteFieldPath`
// Result: "name.first" | "name.last" | `name.aliases.${number}` | "age" | `friends.${number}`
type CustomAbsoluteFieldPath = AbsoluteFieldPath<CustomFieldValues>; |
Beta Was this translation helpful? Give feedback.
Answered by
slbls
Sep 12, 2021
Replies: 1 comment
-
After looking further into this, #6466 actually better fulfills the broader intended use case behind this request, where a generic component can be restricted to specific actionable paths. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
slbls
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After looking further into this, #6466 actually better fulfills the broader intended use case behind this request, where a generic component can be restricted to specific actionable paths.