Improve IDE quality of life using tsconfig paths #574
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are some minor annoyances when developing locally that this PR attempts to address:
In vscode (and likely other IDEs) when trying to "Go to definition" on something that was imported from another protobuf-ts package it will take you to the .d.ts file in the symlinked build folder. This makes navigating the repo more difficult than it need be.
In an ideal world we would be able to use TypeScript's "Project References" which can handle automatically building other referenced packages when it detects a file has changed. Unfortunately ts-node (used for running tests, etc.) doesn't support this functionality: ts-node with project references in a lerna monorepo TypeStrong/ts-node#897
So for now there is still a manual process of having to re-run
make build
in whatever package directory before re-running tests from another package directory which depended on that other package.Improve karma code coverage results by turning on source maps during testing and ignoring the
/spec
directory (we don't need coverage results of the test suite itself).Add top-level dev dependency for jasmine types so that you don't see red underlines on all the global jasmine functions: describe, test, it, expect, etc.
Add top-level dev dependency for typescript so that vscode (and likely other IDEs) can find/use the correct typescript lib (3.9.6) for inline type checking