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

Add typings to package.json in packages #18640

Merged
merged 2 commits into from
Aug 22, 2019
Merged

Add typings to package.json in packages #18640

merged 2 commits into from
Aug 22, 2019

Conversation

aocenas
Copy link
Member

@aocenas aocenas commented Aug 20, 2019

This should fix issues with code navigation (jump to def, autocomplete) in webstorm at least (https://intellij-support.jetbrains.com/hc/en-us/community/posts/360001029920--main-field-in-package-json-is-ignored-when-importing-from-node-module).

One thing to note is that it points to src/index.ts file. Issue is I am not sure if that is also distributed? @dprokop @ryantxu ? I could put there dist/index.d.ts which probably would make sense but would need to build (and rebuild on change) during dev.

Copy link
Member

@ryantxu ryantxu left a comment

Choose a reason for hiding this comment

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

Looks fine to me... but I don't really know what the implications are so I'll let @dprokop verify :)

@dprokop
Copy link
Member

dprokop commented Aug 21, 2019

@aocenas Seems to work fine in VSCode as well.

Regarding src/index.ts. This file is not distributed.

Copy link
Member

@dprokop dprokop left a comment

Choose a reason for hiding this comment

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

src/index.ts

packages/grafana-data/package.json Outdated Show resolved Hide resolved
@aocenas aocenas merged commit d4382ad into master Aug 22, 2019
@aocenas aocenas deleted the code-navigation-fix branch August 22, 2019 08:20
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 23, 2019
* grafana/master:
  Streaming: improve JSDocs for DataSourceAPI streaming support (grafana#18672)
  TimeSrv: Enable value time windowing in TimeSrv (grafana#18636)
  Explore: Fixes so Show context shows results again (grafana#18675)
  Graph: Updated y-axis ticks test dashboard (grafana#18677)
  Add typings to package.json in packages (grafana#18640)
  Plugins: better warning when plugins fail to load (grafana#18671)
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 26, 2019
* grafana/master:
  Heatmap: Add Cividis and Turbo color schemes (grafana#18710)
  Units: add counts/sec (cps) and counts/min (cpm) in Throughput (grafana#18702)
  Dev Docker: Use golang:1.12.9-alpine to prevent glibc mismatch. (grafana#18701)
  Docs: Fix broken link for the Grafana on RHEL or Ubuntu tutorial (grafana#18697)
  Fixes several usability issues with QueryField component  (grafana#18681)
  convert teams section of user profile to react (grafana#18633)
  Singlestat/Gauge/BarGauge: Improvements to decimals logic and added test dashboard (grafana#18676)
  Emails: Change text (grafana#18683)
  Streaming: improve JSDocs for DataSourceAPI streaming support (grafana#18672)
  TimeSrv: Enable value time windowing in TimeSrv (grafana#18636)
  Explore: Fixes so Show context shows results again (grafana#18675)
  Graph: Updated y-axis ticks test dashboard (grafana#18677)
  Add typings to package.json in packages (grafana#18640)
  Plugins: better warning when plugins fail to load (grafana#18671)
  SingleStat2: save options to defaults not override (grafana#18666)
  Packages: Fix path import from grafana/data (grafana#18667)
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 26, 2019
* grafana/master:
  @grafana/data: improve the CircularVector api (grafana#18716)
  QueryEditor: check if optional func toggleEditorMode is provided (grafana#18705)
  Emails: remove the yarn.lock (grafana#18724)
  OAuth: Support JMES path lookup when retrieving user email (grafana#14683)
  Emails: resurrect template notification (grafana#18686)
  Email: add reply-to and direct attachment (grafana#18715)
  Dashboard: Adds Logs Panel (alpha) as visualization option for Dashboards (grafana#18641)
  Heatmap: Add Cividis and Turbo color schemes (grafana#18710)
  Units: add counts/sec (cps) and counts/min (cpm) in Throughput (grafana#18702)
  Dev Docker: Use golang:1.12.9-alpine to prevent glibc mismatch. (grafana#18701)
  Docs: Fix broken link for the Grafana on RHEL or Ubuntu tutorial (grafana#18697)
  Fixes several usability issues with QueryField component  (grafana#18681)
  convert teams section of user profile to react (grafana#18633)
  Singlestat/Gauge/BarGauge: Improvements to decimals logic and added test dashboard (grafana#18676)
  Emails: Change text (grafana#18683)
  Streaming: improve JSDocs for DataSourceAPI streaming support (grafana#18672)
  TimeSrv: Enable value time windowing in TimeSrv (grafana#18636)
  Explore: Fixes so Show context shows results again (grafana#18675)
  Graph: Updated y-axis ticks test dashboard (grafana#18677)
  Add typings to package.json in packages (grafana#18640)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants