-
Notifications
You must be signed in to change notification settings - Fork 8k
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
update to TypeScript v3.8-rc #57774
Changes from 13 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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
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>(); | ||
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]); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
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.2" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,9 @@ | |
|
||
import 'jest-styled-components'; | ||
import '@testing-library/jest-dom/extend-expect'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import * as testingLibraryDom from '@testing-library/dom'; | ||
|
||
testingLibraryDom.configure({ | ||
testIdAttribute: 'data-test-subj', | ||
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 got a bunch of type errors due to |
||
}); |
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.
(Thinking) npm really need a maven-like pinable version management for multi-projects...