seas-computing / mark-one

A UI component library for building React Apps (in development)
https://seas-computing.github.io/mark-one/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Fix export of theme type #165

Closed jonseitz closed 6 months ago

jonseitz commented 6 months ago

Describe your changes

It seems that the DefaultTheme override in the styled.d.ts file was causing problems in the build phase -- mainly that the declarations were not being carried over into the final output. To resolve, we're removing the d. from the filename, and exporting an empty module from the new file. Importing that empty module into our index barrel file seems to be enough to pick up the declarations and package them into the final output.

I tested this by running npm run prepublishOnly in the mark-one project root, which builds the code under lib/. I then copied that entire lib folder into the node_modules/mark-one/ directory of a different project (i.e. apply-seas-node), removed the styled.d.ts from that project, and confirmed that typescript is still able to pick up the typing for added keys like ws.small.

Types of changes

Checklist:

Priority:

Related Issues:

Fixes #162