-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74b5a92
commit 721be75
Showing
9 changed files
with
1,243 additions
and
711 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
{ | ||
"preset": "ts-jest", | ||
"testMatch": [ | ||
"<rootDir>/src/**/*.test.{tsx,ts}" | ||
], | ||
"modulePathIgnorePatterns": [ | ||
"<rootDir>/lib" | ||
], | ||
"transform": { | ||
"^.+\\.tsx?$": "@swc/jest" | ||
}, | ||
"testMatch": ["<rootDir>/src/test/**/*.test.ts"], | ||
"modulePathIgnorePatterns": ["<rootDir>/lib"], | ||
"detectOpenHandles": true, | ||
"forceExit": true | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
import { ComponentType } from 'react'; | ||
import { RouteState } from './__loadRoute'; | ||
import { RouteMatch } from './__matchRoutes'; | ||
import { Router } from './Router'; | ||
|
||
export class View { | ||
childView: View | undefined; | ||
parentView: View | null = null; | ||
nestedView: View | null = null; | ||
|
||
/** | ||
* State of a route rendered by the view, or `undefined` is there's no route, or route wasn't loaded yet. | ||
*/ | ||
routeState: Promise<RouteState> | RouteState | undefined = undefined; | ||
|
||
renderedView: View = this; | ||
|
||
constructor( | ||
readonly router: Router, | ||
readonly routeMatch?: RouteMatch | ||
router: Router, | ||
readonly routeMatch: RouteMatch | undefined | ||
) {} | ||
|
||
setPayload(routePayload: RouteState): void {} | ||
hasErrorBoundary(): boolean { | ||
return true; | ||
} | ||
|
||
hasSuspendBoundary(): boolean { | ||
return true; | ||
} | ||
|
||
getComponentOrSuspend(): ComponentType | undefined { | ||
return; | ||
} | ||
|
||
freeze(): void {} | ||
getFallbackComponent(): ComponentType | undefined { | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters