feat: add helpers to make Fresh less TypeScripty (#1627)

This commit is contained in:
Marvin Hagemeister
2023-08-14 22:45:13 +02:00
committed by GitHub
parent 6436a43dce
commit 726740ed39
11 changed files with 157 additions and 13 deletions
+2 -2
View File
@@ -163,9 +163,9 @@ function defaultCsp() {
};
}
function checkAsyncComponent(
export function checkAsyncComponent<T>(
component: unknown,
): component is AsyncRoute | AsyncLayout {
): component is AsyncRoute<T> | AsyncLayout<T> {
return typeof component === "function" &&
component.constructor.name === "AsyncFunction";
}