-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[v9] refactor(types): export public types #2559
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 12fbd11:
|
packages/fiber/src/core/stages.ts
Outdated
export interface UpdateCallback { | ||
(state: RootState, delta: number, frame?: XRFrame): void | ||
} | ||
|
||
export type UpdateCallbackRef = MutableRefObject<UpdateCallback> | ||
type Store = UseBoundStore<RootState, StoreApi<RootState>> | ||
export type UpdateSubscription = { ref: UpdateCallbackRef; store: Store } | ||
|
||
export type FixedStageOptions = { fixedStep?: number; maxSubsteps?: number } | ||
export type FixedStageProps = { fixedStep: number; maxSubsteps: number; accumulator: number; alpha: number } | ||
// TODO: Remove deprecated fields in `Subscription` | ||
export type UpdateSubscription = Omit<Subscription, 'priority'> |
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.
I didn't see use of FixedStageOptions
or FixedStageProps
anywhere, but what's going on with UpdateCallback
and RenderCallback
? Should we alias or rename/depreciate them?
|
||
type GlobalRenderCallback = (timeStamp: number) => void | ||
export type GlobalRenderCallback = (timestamp: number) => void | ||
type SubItem = { callback: GlobalRenderCallback } | ||
|
||
function createSubs(callback: GlobalRenderCallback, subs: Set<SubItem>): () => void { |
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.
This should be backported to v8 in a patch release. We didn't actually export anything in #2481.
Exports public-facing types from the core, namely events and state keys.