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 TS 2.7 compatibility. Fixes #3862. #3863

Merged
merged 1 commit into from
Jun 7, 2018
Merged

Add TS 2.7 compatibility. Fixes #3862. #3863

merged 1 commit into from
Jun 7, 2018

Conversation

domoritz
Copy link
Member

@domoritz domoritz commented Jun 7, 2018

No description provided.

@domoritz domoritz requested a review from kanitw June 7, 2018 06:20
@jasongrout
Copy link

How about this patch, which uses the import and still generates TS 2.7-compatible syntax:

diff --git a/src/compositemark/index.ts b/src/compositemark/index.ts
index 6f089c70b..befefe93b 100644
--- a/src/compositemark/index.ts
+++ b/src/compositemark/index.ts
@@ -1,9 +1,15 @@
 import {Config} from './../config';
 import {AnyMark, isMarkDef} from './../mark';
 import {GenericUnitSpec, NormalizedLayerSpec} from './../spec';
-import {BOXPLOT, BOXPLOT_STYLES, BoxPlotConfigMixins, BoxPlotDef, normalizeBoxPlot, VL_ONLY_BOXPLOT_CONFIG_PROPERTY_INDEX} from './boxplot';
+import {BOXPLOT, BoxPlotConfigMixins, BoxPlotDef, normalizeBoxPlot, VL_ONLY_BOXPLOT_CONFIG_PROPERTY_INDEX} from './boxplot';
 import {ERRORBAR, normalizeErrorBar} from './errorbar';
 
+// This package import below makes the generated .d.ts file compatible with
+// Typescript 2.7 so that libraries requiring us can use Typedoc (which
+// currently is limited to Typescript 2.7). This comment and import can be
+// removed when Typedoc is updated to Typescript 2.9 or later. See
+// https://github.com/vega/vega-lite/issues/3862 for more details.
+import * as boxplot from './boxplot';
 
 export {BoxPlotConfig} from './boxplot';
 export type UnitNormalizer = (spec: GenericUnitSpec<any, any>, config: Config)=> NormalizedLayerSpec;
@@ -27,7 +33,7 @@ export type CompositeMarkDef = BoxPlotDef;
 
 export type CompositeAggregate = BOXPLOT;
 
-export const COMPOSITE_MARK_STYLES = BOXPLOT_STYLES;
+export const COMPOSITE_MARK_STYLES = boxplot.BOXPLOT_STYLES;
 export type CompositeMarkStyle = typeof COMPOSITE_MARK_STYLES[0];
 
 export interface CompositeMarkConfigMixins extends BoxPlotConfigMixins {}

@jasongrout
Copy link

The patch above should take care of the error that the declared boxplot variable is not being used.

@domoritz domoritz merged commit 1c0a743 into master Jun 7, 2018
@domoritz domoritz deleted the dom/ts-fix branch June 7, 2018 17:17
@domoritz
Copy link
Member Author

domoritz commented Jun 7, 2018

Is it okay if we wait for the 2.6 release before releasing this?

@jasongrout
Copy link

Of course it's your call. I'm curious how long before 2.6? This is the only thing blocking us in JupyterLab from moving to TS 2.9, which we'd like to do soon as well.

@jasongrout
Copy link

(We'd like to do a prerelease of the next version of JupyterLab early next week, and it would be great if we could move to TS 2.9 by that time. But at the same time I realize that you may have different timeline constraints.)

@domoritz
Copy link
Member Author

domoritz commented Jun 7, 2018

Okay, then I will make a 2.5.2 release off a branch. We already merged things into master that require a minor version bump.

@domoritz
Copy link
Member Author

domoritz commented Jun 7, 2018

2.5.2 is out. I hope I didn't break anything as I had to make the tags and release manually.

@jasongrout
Copy link

Thanks!

jasongrout added a commit to jasongrout/jupyterlab that referenced this pull request Jun 7, 2018
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