-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): Adds unstable_pages module to JS API #2526
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
Adds unstable_pages module to JS API |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export { unstable_dev } from "./dev"; | ||
export type { UnstableDevWorker, UnstableDevOptions } from "./dev"; | ||
export { unstable_pages } from "./pages"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You might want to export the types for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you don't mind, I'd like to hold off on that rabbit hole. There's a lot of types involved and I'd like to move more code around to export all of the relevant bits. If a consumer needs the type of the argument to type PublishOptions = typeof unstable_pages.publish extends (options: infer P) => any ? P : never
type PublishResult = typeof unstable_pages.publish extends (options: any) => infer P ? P : never I - being the only consumer of this code so far - don't actually need that yet :) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { publish } from "./publish"; | ||
|
||
export const unstable_pages = { | ||
publish, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GregBrimble I found it more reliable to not sort the requests and lookup by index. But rather key the requests by the
key
property and lookup by saidkey
property