Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Conversation

@elliottsj
Copy link
Contributor

Summary

Adjust the build step so core-em and core-sc have their own independent type definitions, and copy the shared definitions to a 'shared/index.d.ts' module.

Fixes #106

Test plan

Check out my branch, then yarn run build the repo. Then run:

npm install ./smooth-ui/packages/core-em @emotion/core @emotion/styled emotion-theming typescript @types/react
echo "import { Button } from '@smooth-ui/core-em';" > index.ts
./node_modules/.bin/tsc index.ts

The tsc command should exit with status 0.

I have tested this with my own application which uses emotion + TypeScript, but I haven't tested with a styled-components project yet. I'd also like to add a tsc build/test step to smooth-ui to prevent future regressions. Let me know if I should include it as part of this PR or a follow-up PR, and any other suggestions!

Adjust the build step so core-em and core-sc have their own independent
type definitions, and copy the shared definitions to a
'shared/index.d.ts' module.
@gregberge
Copy link
Member

Hello @elliottsj, thanks for your work! I think adding a build step to this PR is a good idea!

@elliottsj
Copy link
Contributor Author

Okay, I've added a tsc:check npm script which will verify both index.d.ts files as part of the CI build.

@gregberge gregberge merged commit 87eda0b into smooth-code:master Feb 4, 2019
@elliottsj elliottsj deleted the typescript-emotion branch February 4, 2019 15:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants