currrent behavior:
type TestType = {
test?: null | { someField: number };
};
// PathsFromTestType = 'test' | 'test.someField'
type PathsFromTestType = Paths<
TestType,
{ leavesOnly: true; maxRecursionDepth: 10 }
>;
expected behavior:
// PathsFromTestType = 'test.someField'
workaroround
type TestType = {
test?: null | { someField: number };
};
// PathsFromTestType = 'test. someField'
type PathsFromTestType = Paths<
SetNonNullableDeep<
TestType,
Paths<TestType, { leavesOnly: true; maxRecursionDepth: 10 }>
>,
{ leavesOnly: true; maxRecursionDepth: 10 }
>;