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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: introduce modern typings for TS >4 #70

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Mar 9, 2022

Fixes #378.

This PR introduces modern typings for TypeScript 4.1 and higher as this version supports recursive types references. This allow to simplify typings and remove weird workarounds. Also newer typings make TS errors more precise (check changes in the fixtures) 馃憤

To keep compatibility with older versions of TS older typings are kept as legacy. To resolve them typesVersions field is used.

@github-actions
Copy link

github-actions bot commented Jul 13, 2023

馃搳 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
core
makeResetStyles (runtime)
16.886 kB
6.442 kB
core
makeStyles + mergeClasses (build time)
2.19 kB
1.045 kB
core
makeStyles + mergeClasses (runtime)
21.835 kB
8.261 kB
react
__css + mergeClasses (build time)
2.227 kB
1.046 kB
react
__styles + mergeClasses (build time)
4.045 kB
1.844 kB
react
makeResetStyles (runtime)
18.776 kB
7.223 kB
react
makeStaticStyles (runtime)
8.753 kB
3.868 kB
react
makeStyles + mergeClasses (runtime)
23.73 kB
9.023 kB
shadow-dom
createShadowDOMRenderer
3.232 kB
1.405 kB
馃 This report was generated against b4c28f871df20ed62fa47fdf44de854c05ca3e6a

@layershifter layershifter force-pushed the fix/make-typings-better branch 2 times, most recently from 7648ba4 to 15872f7 Compare July 14, 2023 11:09
@@ -3,7 +3,7 @@ import * as logSymbols from 'log-symbols';

export function createTempDir(prefix: string) {
// "Unsafe" means delete even if it still has files inside (our desired behavior)
const tempDir = tmp.dirSync({ prefix: 'nextjs', unsafeCleanup: true }).name;
const tempDir = tmp.dirSync({ prefix, unsafeCleanup: true }).name;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops

@@ -0,0 +1,6 @@
export type { GriffelAnimation, GriffelStyle } from './makeStyles';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied from previous typings.

@layershifter layershifter marked this pull request as ready for review July 14, 2023 11:16
@layershifter layershifter requested a review from a team as a code owner July 14, 2023 11:16
@layershifter layershifter merged commit c9458be into microsoft:main Jul 14, 2023
4 checks passed
@layershifter layershifter deleted the fix/make-typings-better branch July 14, 2023 12:08
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.

bug(core): Typescript error using animationName inside of a nested selector
2 participants