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(typescript): provide .d.ts files at the root #12600

Conversation

tay1orjones
Copy link
Member

Currently in the build output there is not an index.d.ts that references all the component's .d.ts files. Without this intellisense, etc does not work.

I've modified the root index.js to be .ts, which should get rollup to add the root index.d.ts. Unfortunately this has highlighted another issue - anywhere we're using

export default from './Component';

needs to be refactored to

import Component from './Component';
export default Component;

Testing / Reviewing

  • cd into packages/react
  • run yarn build
  • view es folder output - an index.d.ts should be present alongside the compiled index.js

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for carbon-components-react failed.

Name Link
🔨 Latest commit 773f664
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/636db0b193768e0008ef02d4

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 773f664
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/636db0b1c3373500094d5e00
😎 Deploy Preview https://deploy-preview-12600--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@tay1orjones
Copy link
Member Author

Closing in favor of #12787

@tay1orjones tay1orjones closed this Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants