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

fix(types): Constrain Modifier Options to same type as Options in ModifierArguments #1598

Merged
merged 1 commit into from Apr 5, 2022

Conversation

eps1lon
Copy link
Contributor

@eps1lon eps1lon commented Mar 30, 2022

This targets 2.x.

Fixes issues with TypeScript 4.7 canary (microsoft/TypeScript#48366 specifically) that are blocking DefinitelyTyped/DefinitelyTyped#56210

Ran yarn build:typescript and made sure the same diff that fixed https://github.com/DefinitelyTyped/DefinitelyTyped/runs/5752176130?check_suite_focus=true#step:6:1271 was applied:

-export declare type Modifier<Name, Options> = {
+export declare type Modifier<Name, Options extends Obj> = {
     name: Name;
     enabled: boolean;
     phase: ModifierPhases;
     requires?: Array<string>;
     requiresIfExists?: Array<string>;
     fn: (arg0: ModifierArguments<Options>) => State | void;
     effect?: (arg0: ModifierArguments<Options>) => (() => void) | void;
     options?: Partial<Options>;
     data?: Obj;
 };

@rollingversions
Copy link

rollingversions bot commented Mar 30, 2022

Change Log for @popperjs/core (2.11.4 → 2.11.5)

Bug Fixes

Edit changelog

@eps1lon eps1lon marked this pull request as ready for review March 30, 2022 11:38
@gaearon
Copy link

gaearon commented Apr 5, 2022

Hi @atomiks, sorry for direct ping but any chance you could have a look at this? This PR is currently the only thing blocking the release of the React 18 typings. Thank you <3

@FezVrasta FezVrasta merged commit 593aefe into floating-ui:v2.x Apr 5, 2022
@eps1lon eps1lon deleted the fix/ts-4.7-compat branch April 5, 2022 12:56
@gaearon
Copy link

gaearon commented Apr 5, 2022

Thank you! Appreciate that you’re taking a fix for 2.x.

@FezVrasta
Copy link
Member

Thanks for the PR! The change is now live as @popperjs/core@2.11.5

@eps1lon
Copy link
Contributor Author

eps1lon commented Apr 5, 2022

Thanks for the PR! The change is now live as @popperjs/core@2.11.5

Awesome! Appreciate the quick action and really sorry you had to revive 2.x 😅

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.

None yet

3 participants