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
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality
to change)
Checklist:
[x] I have run eslint on the code
[x] I have added JSDoc for all of my code (where applicable)
Describe your changes
It seems that the
DefaultTheme
override in thestyled.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 thed.
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 underlib/
. I then copied that entirelib
folder into thenode_modules/mark-one/
directory of a different project (i.e.apply-seas-node
), removed thestyled.d.ts
from that project, and confirmed that typescript is still able to pick up the typing for added keys likews.small
.Types of changes
Checklist:
eslint
on the codePriority:
Related Issues:
Fixes #162