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

mark Theme UI as written in TypeScript in DefinitelyTyped #1582

Closed
hasparus opened this issue Mar 22, 2021 · 9 comments
Closed

mark Theme UI as written in TypeScript in DefinitelyTyped #1582

hasparus opened this issue Mar 22, 2021 · 9 comments
Labels
good first issue Good for newcomers types

Comments

@hasparus
Copy link
Member

Theme UI 0.3 had its types in DefinitelyTyped. Theme UI 0.6 is written in TypeScript and bundles its types.

We need to follow the "Removing a package" instruction to mark Theme UI as rewritten to TS which will cause a publish of stub definitions with a warning telling people they don't need @types/theme-ui when they install it.

@hasparus hasparus added good first issue Good for newcomers types labels Mar 22, 2021
@flo-sch
Copy link
Collaborator

flo-sch commented Apr 22, 2021

Even theme-ui v0.4 was partially converted, not sure if it's worth going that deep into the versions though? 🤷‍♂️

Any other packages in Definitely Typed that referenced the deleted package should be updated to reference the bundled types. You can get this list by looking at the errors from npm run test-all. To fix the errors, add a package.json with "dependencies": { "": "x.y.z" }. For example:

Do we already know of any other package referencing theme-ui types?

@hasparus
Copy link
Member Author

Do we already know of any other package referencing theme-ui types?

It seems we're clear on this front.

DefinitelyTyped on  master 
⇝  grep -nr "from 'theme-ui'" .
./types/theme-ui/index.d.ts:327:     * import { jsx } from 'theme-ui'
./types/theme-ui/theme-ui-tests.tsx:2:import { Flex, jsx, css, InitializeColorMode, ColorMode, Styled, SxStyleProp, Theme, useThemeUI } from 'theme-ui';
./types/theme-ui__components/theme-ui__components-tests.tsx:2:import { jsx } from 'theme-ui';
./types/theme-ui__components/index.d.ts:12:import { SxStyleProp } from 'theme-ui';

@flo-sch
Copy link
Collaborator

flo-sch commented Apr 22, 2021

I have never removed a package from DT, do we need specific permissions to run the npm run not-needed ...?

Otherwise I can submit a PR perhaps

@hasparus
Copy link
Member Author

do we need specific permissions to run the npm run not-needed ...?

I don't think so, but I'm not 100% sure.

@flo-sch
Copy link
Collaborator

flo-sch commented Apr 23, 2021

I'll figure it out :)

@flo-sch
Copy link
Collaborator

flo-sch commented Apr 23, 2021

Perhaps theme-ui__components 🤔?

Or should we also remove that one now? (is it too early?)
(Even though the components package has not been converted to TS yet, it provides its own typings)

flo-sch added a commit to flo-sch/DefinitelyTyped that referenced this issue Apr 23, 2021
theme-ui provides its own types as of v0.6.0
(system-ui/theme-ui#1582))
flo-sch added a commit to flo-sch/DefinitelyTyped that referenced this issue Apr 23, 2021
@theme-ui/components provides its own types as of v0.6.0
(system-ui/theme-ui#1582))
@hasparus
Copy link
Member Author

(Even though the components package has not been converted to TS yet, it provides its own typings)

We can defo treat it like written in TypeScript — we maintain these types and some day we're gonna merge them with the implementation.

@flo-sch
Copy link
Collaborator

flo-sch commented Apr 23, 2021

Yeah, I had the same thing in mind :)

elibarzilay pushed a commit to DefinitelyTyped/DefinitelyTyped that referenced this issue May 4, 2021
…needed) (#52551)

* feat(theme-ui): remove theme-ui package

theme-ui provides its own types as of v0.6.0
(system-ui/theme-ui#1582))

* feat(theme-ui__components): remove theme-ui__components package

@theme-ui/components provides its own types as of v0.6.0
(system-ui/theme-ui#1582))
@hasparus hasparus closed this as completed May 5, 2021
@hasparus
Copy link
Member Author

hasparus commented May 5, 2021

Thanks for this @flo-sch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers types
Projects
None yet
Development

No branches or pull requests

2 participants