-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Use only named exports, rather than a mix
- Loading branch information
1 parent
7fa49c9
commit 6cf9462
Showing
9 changed files
with
13 additions
and
17 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,3 +1,3 @@ | ||
import { ComponentChild } from 'preact'; | ||
|
||
export default function hydrate(jsx: ComponentChild, parent?: Element | Document | ShadowRoot | DocumentFragment): void; | ||
export function hydrate(jsx: ComponentChild, parent?: Element | Document | ShadowRoot | DocumentFragment): void; |
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,4 +1,3 @@ | ||
export { default as prerender } from './prerender.js'; | ||
export * from './router.js'; | ||
export { default as lazy, ErrorBoundary } from './lazy.js'; | ||
export { default as hydrate } from './hydrate.js'; | ||
export * from './lazy.js'; | ||
export * from './hydrate.js'; |
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,7 +1,4 @@ | ||
// lack of wildcard export is intentional to avoid exposing `exec` | ||
export { Router, LocationProvider, useLocation, Route, useRoute } from './router.js'; | ||
export { default as lazy, ErrorBoundary } from './lazy.js'; | ||
export { default as hydrate } from './hydrate.js'; | ||
|
||
export function prerender(vnode, options) { | ||
return import('./prerender.js').then(m => m.default(vnode, options)); | ||
} | ||
export * from './lazy.js'; | ||
export * from './hydrate.js'; |
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,5 +1,5 @@ | ||
import { ComponentChildren, VNode } from 'preact'; | ||
|
||
export default function lazy<T>(load: () => Promise<{ default: T } | T>): T; | ||
export function lazy<T>(load: () => Promise<{ default: T } | T>): T; | ||
|
||
export function ErrorBoundary(props: { children?: ComponentChildren; onError?: (error: Error) => void }): VNode; |
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