-
Notifications
You must be signed in to change notification settings - Fork 2
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: Fix types and typescript config for publishing #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
what from Drizzle was causing the massive output?
ah shoot didn't realize this was still a draft 😅 consider my approval an incremental one haha |
Node16 moduleResolution is stricter, and there is a bug in typeRoots module resolution, so need to use `paths` config to resolve custom types in @digidem/types. Because of stricter resolution, Typescript no longer likes merging types from both a `.js` and `.d.ts`. Switched `types.js` and `types.d.ts` to be a single `.ts` file that defines the types. Using `.d.ts` for this causes issues when compiling declarations for module packaging.
Using package.files instead of `.npmignore`
Needed to update drizzle for simplification of typescript docs
6262a95
to
920a516
Compare
Current status: types work fine within the module (e.g. when type-checking the e2e tests everything is correct) but when using via This seems to be related to a whole jumbled TS definition in the declaration file for |
Typescript was not correctly compiling the declaration, so switched to write it manually.
Also includes e2e tests in `npm test`
Have switched to manually writing the |
Several type-related tasks to prepare for publishing to npm:
TODO:
project.observation.getByDocId()
returns{ [string]: any }
, even though it works from within the e2e tests. Something to do with declaration compilation. Going to simplify the types of DataType to see if that works.