Use segment type

This commit is contained in:
RMidhunSuresh 2022-02-22 13:16:54 +05:30
parent 5d42f372f6
commit c14e4f3eed

View File

@ -43,7 +43,7 @@ export function createRouter({history, navigation}) {
return new URLRouter(history, navigation, parseUrlPath, stringifyPath);
}
function allowsChild(parent: {type: string, value: any} | undefined, child: {type: string, value: any}): boolean {
function allowsChild(parent: Segment<SegmentType> | undefined, child: Segment<SegmentType>): boolean {
const {type} = child;
switch (parent?.type) {
case undefined: