-
Notifications
You must be signed in to change notification settings - Fork 63
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
Typescript checking for config slot names #3629
Conversation
9207dfb
to
ed6001d
Compare
* improve readConfObject ts for slot names * slot name checking support for explicitIdentifier * move mouseover config slot in linear from LinearBasicDisplay to BaseLinearDisplay config schema * remove some commented code and typos * change most things to import config things from @jbrowse/core/configuration top-level * ts checking of base-conf working
ed6001d
to
9ee6eb9
Compare
rebased and squashed just now onto main. @cmdcolin does this look OK to merge now? |
const refNameAliasesAdapterConf = conf.refNameAliases?.adapter | ||
const cytobandAdapterConf = conf.cytobands?.adapter | ||
const sequenceAdapterConf = conf.sequence.adapter | ||
const refNameAliasesAdapterConf = conf?.refNameAliases?.adapter |
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.
any reason for additional undefined checks?
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.
Yes, TS found that some of those things can be undefined
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.
I see that the configuration is a safeReference so that could be indeed possibly undefined, but my editor says self.configuration is type any so wonder if it regressed back to any somehow
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.
yeah it did regress back, somehow, let me see if I can improve the types there
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.
Actually, upon looking into it further, I don't think it did regress, I think I may have been using a different version of TS or mst that caught that error
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.
can you identify which versions? the repo of course has the lock file, and ts/mst versions haven't changed substantially for awhile
Codecov Report
@@ Coverage Diff @@
## main #3629 +/- ##
=======================================
Coverage 63.06% 63.07%
=======================================
Files 877 877
Lines 30167 30168 +1
Branches 7272 7271 -1
=======================================
+ Hits 19026 19028 +2
+ Misses 10956 10955 -1
Partials 185 185
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
should be ok |
This PR adds type checking of config slot names to the configuration system TS. It can figure out the specific config schema surprisingly often.
Other things in this PR: