Skip to content
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

Merged
merged 5 commits into from
Oct 20, 2022

Conversation

CodyJasonBennett
Copy link
Member

Exports public-facing types from the core, namely events and state keys.

@CodyJasonBennett CodyJasonBennett changed the title refactor(types): export public types [v9] refactor(types): export public types Oct 10, 2022
@CodyJasonBennett CodyJasonBennett mentioned this pull request Oct 10, 2022
18 tasks
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 10, 2022

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:

Sandbox Source
example Configuration

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'>
Copy link
Member Author

@CodyJasonBennett CodyJasonBennett Oct 10, 2022

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?

@CodyJasonBennett CodyJasonBennett requested review from krispya, drcmda and joshuaellis and removed request for krispya and drcmda October 10, 2022 10:45
Comment on lines 4 to 8

type GlobalRenderCallback = (timeStamp: number) => void
export type GlobalRenderCallback = (timestamp: number) => void
type SubItem = { callback: GlobalRenderCallback }

function createSubs(callback: GlobalRenderCallback, subs: Set<SubItem>): () => void {
Copy link
Member Author

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.

@CodyJasonBennett CodyJasonBennett merged commit cb65de1 into v9 Oct 20, 2022
@CodyJasonBennett CodyJasonBennett deleted the refactor/export-public-types branch October 20, 2022 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants