-
Notifications
You must be signed in to change notification settings - Fork 8.6k
update to TypeScript v3.8-rc #57774
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
update to TypeScript v3.8-rc #57774
Changes from 7 commits
3018d18
4bab0a5
b9016ff
34b069d
c62c8df
6c8c249
f282992
647d2b7
c561ee4
82fcfdc
fa4334f
1ab9894
1c25e13
3e1e353
5fe5d5c
9d8c170
b3489d9
33d3f93
822b5bd
9d51788
f13a261
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,18 +70,18 @@ const emptyCaption = '<br>'; | |
| function Panel({ interval, seriesList, renderComplete }: PanelProps) { | ||
| const kibana = useKibana<TimelionVisDependencies>(); | ||
| const [chart, setChart] = useState(() => cloneDeep(seriesList.list)); | ||
| const [canvasElem, setCanvasElem] = useState(); | ||
| const [chartElem, setChartElem] = useState(); | ||
| const [canvasElem, setCanvasElem] = useState<HTMLElement>(); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the file still contains some type errors. @timroes @sulemanof could someone take a look and fix the errors, please? |
||
| const [chartElem, setChartElem] = useState<HTMLElement>(); | ||
|
|
||
| const [originalColorMap, setOriginalColorMap] = useState(() => new Map<Series, string>()); | ||
|
|
||
| const [highlightedSeries, setHighlightedSeries] = useState<number | null>(null); | ||
| const [focusedSeries, setFocusedSeries] = useState(); | ||
| const [plot, setPlot] = useState(); | ||
| const [focusedSeries, setFocusedSeries] = useState<number | null>(); | ||
| const [plot, setPlot] = useState<jquery.flot.plot>(); | ||
|
|
||
| // Used to toggle the series, and for displaying values on hover | ||
| const [legendValueNumbers, setLegendValueNumbers] = useState(); | ||
| const [legendCaption, setLegendCaption] = useState(); | ||
| const [legendValueNumbers, setLegendValueNumbers] = useState<JQuery<HTMLElement>>(); | ||
| const [legendCaption, setLegendCaption] = useState<JQuery<HTMLElement>>(); | ||
|
|
||
| const canvasRef = useCallback(node => { | ||
| if (node !== null) { | ||
|
|
@@ -97,7 +97,7 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { | |
|
|
||
| useEffect( | ||
| () => () => { | ||
| $(chartElem) | ||
| $(chartElem!) | ||
| .off('plotselected') | ||
| .off('plothover') | ||
| .off('mouseleave'); | ||
|
|
@@ -156,11 +156,11 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { | |
| caption.html(emptyCaption); | ||
| setLegendCaption(caption); | ||
|
|
||
| const canvasNode = $(canvasElem); | ||
| const canvasNode = $(canvasElem!); | ||
| canvasNode.find('div.legend table').append(caption); | ||
| setLegendValueNumbers(canvasNode.find('.ngLegendValueNumber')); | ||
|
|
||
| const legend = $(canvasElem).find('.ngLegendValue'); | ||
| const legend = $(canvasElem!).find('.ngLegendValue'); | ||
| if (legend) { | ||
| legend.click(toggleSeries); | ||
| legend.focus(focusSeries); | ||
|
|
@@ -254,20 +254,20 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { | |
| (pos: Position) => { | ||
| unhighlightSeries(); | ||
|
|
||
| const axes = plot.getAxes(); | ||
| if (pos.x < axes.xaxis.min || pos.x > axes.xaxis.max) { | ||
| const axes = plot!.getAxes(); | ||
| if (pos.x < axes.xaxis.min! || pos.x > axes.xaxis.max!) { | ||
| return; | ||
| } | ||
|
|
||
| const dataset = plot.getData(); | ||
| const dataset = plot!.getData(); | ||
| if (legendCaption) { | ||
| legendCaption.text( | ||
| moment(pos.x).format(get(dataset, '[0]._global.legend.timeFormat', DEFAULT_TIME_FORMAT)) | ||
| ); | ||
| } | ||
| for (let i = 0; i < dataset.length; ++i) { | ||
| const series = dataset[i]; | ||
| const useNearestPoint = series.lines.show && !series.lines.steps; | ||
| const useNearestPoint = series.lines!.show && !series.lines!.steps; | ||
| const precision = get(series, '_meta.precision', 2); | ||
|
|
||
| if (series._hide) { | ||
|
|
@@ -289,12 +289,12 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { | |
|
|
||
| if (y != null && legendValueNumbers) { | ||
| let label = y.toFixed(precision); | ||
| if (series.yaxis.tickFormatter) { | ||
| label = series.yaxis.tickFormatter(Number(label), series.yaxis); | ||
| if (series.yaxis!.tickFormatter) { | ||
| label = series.yaxis!.tickFormatter(Number(label), series.yaxis); | ||
| } | ||
| legendValueNumbers.eq(i).text(`(${label})`); | ||
| } else { | ||
| legendValueNumbers.eq(i).empty(); | ||
| legendValueNumbers!.eq(i).empty(); | ||
| } | ||
| } | ||
| }, | ||
|
|
@@ -314,7 +314,7 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { | |
| if (legendCaption) { | ||
| legendCaption.html(emptyCaption); | ||
| } | ||
| each(legendValueNumbers, (num: Node) => { | ||
| each(legendValueNumbers!, (num: Node) => { | ||
| $(num).empty(); | ||
| }); | ||
| }, [legendCaption, legendValueNumbers]); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,6 @@ | |
| }, | ||
| "devDependencies": { | ||
| "@kbn/plugin-helpers": "9.0.2", | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,6 @@ | |
| }, | ||
| "devDependencies": { | ||
| "@kbn/plugin-helpers": "9.0.2", | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,6 @@ | |
| "build": "rm -rf './target' && tsc" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "3.7.2" | ||
| "typescript": "3.8.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ | |
| "js-yaml": "^3.13.1", | ||
| "p-limit": "^2.2.1", | ||
| "ts-loader": "^6.1.0", | ||
| "typescript": "3.7.2", | ||
| "typescript": "3.8.1-rc", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dgieselaar fyi
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking into it!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @restrry I can't explain this - there's no reason I can see why this fails, and others don't. It feels like a TS bug, but I cannot pinpoint it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. btw - in my case, I don't see
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sqren is
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not here until Monday, and my only guess right now is that this is a TS bug (either in resolving or in showing an appropriate error). Can someone flag this with the TS team? If there's not much of a rush I can look into it Monday.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dgieselaar take your time, we are blocked by external dependencies as well |
||
| "webpack": "^4.41.5" | ||
| } | ||
| } | ||



Uh oh!
There was an error while loading. Please reload this page.