-
Notifications
You must be signed in to change notification settings - Fork 617
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
Conversation
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 {} |
The patch above should take care of the error that the declared |
Is it okay if we wait for the 2.6 release before releasing this? |
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. |
(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.) |
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. |
2.5.2 is out. I hope I didn't break anything as I had to make the tags and release manually. |
Thanks! |
This allows typedoc to work. See vega/vega-lite#3862 and vega/vega-lite#3863.
No description provided.