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

Improve IDE quality of life using tsconfig paths #574

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

jcready
Copy link
Contributor

@jcready jcready commented Jul 29, 2023

There are some minor annoyances when developing locally that this PR attempts to address:

  1. 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.

  2. 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).

  3. 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.

  4. 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

Copy link
Owner

@timostamm timostamm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with all changes, but have doubts around the tsconfig paths - let's give them a try though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants