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

Bump TypeScript to v3.9 #67666

Merged
merged 103 commits into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
a82dea3
add babel support for export type
mshustov May 28, 2020
1209ac8
bump ts version to 3.9.3
mshustov May 28, 2020
ac2bc71
rebuild kbn-pm
mshustov May 28, 2020
d3cd8a8
bump typescript-eslint
mshustov May 28, 2020
090b1b7
fix error in security plugin UI
mshustov May 28, 2020
31ce720
check export as works
mshustov May 28, 2020
652af9b
fix app migration type
mshustov May 28, 2020
870eb81
use correct test subj attribute
mshustov May 28, 2020
e3e68f3
fix errors from the old PR
mshustov May 28, 2020
be07879
embeddable is already passed in props
mshustov May 28, 2020
8cae218
explicitly define type of fetch
mshustov May 28, 2020
675a225
add some types for viz
mshustov May 28, 2020
e168c62
fix fetch type p.2
mshustov May 28, 2020
97323f9
add null to allow spreading without type errors due to override
mshustov May 28, 2020
82ab3ef
add type guard to fix type error
mshustov May 28, 2020
8394514
cast to any, since cannot assign unknown
mshustov May 28, 2020
9f68529
add timestamp to known types
mshustov May 28, 2020
72f2296
fix type error in fetch
mshustov May 28, 2020
e9ace30
fix type error. id is always defined in attibutes
mshustov May 28, 2020
dfa2574
declare a type
mshustov May 28, 2020
dd7f2c8
move ts-ignore to the lines with errors
mshustov May 28, 2020
f294214
declare tuple type explicitly
mshustov May 28, 2020
e84eb25
mute type error. cannot assign unknown
mshustov May 28, 2020
3fe70e4
fix errors. id is always defined
mshustov May 28, 2020
a482090
fix error type
mshustov May 28, 2020
09d5706
fix override errors. id is always defined
mshustov May 28, 2020
4dd6549
fix error. extends any doesn't work anymore
mshustov May 28, 2020
796d839
fix type error. type is always defined
mshustov May 28, 2020
1889b6c
env doesn't always contain values
mshustov May 28, 2020
991ddb3
fix type error
mshustov May 28, 2020
dc3ce73
cast to string
mshustov May 28, 2020
96771a2
add: logs is already declared in getNodeLogsUrl
mshustov May 28, 2020
f63dba3
state is already passed in props
mshustov May 28, 2020
9398916
fix some errors in timelion
mshustov May 28, 2020
c2a91ff
number of fragments is always defined
mshustov May 28, 2020
8490984
'absolute' is not just string, but value
mshustov May 28, 2020
f77c5c3
TEMP: option is always defined
mshustov May 28, 2020
9a99b84
always true if cast to promise manually
mshustov May 28, 2020
4cdebff
both props are always defined
mshustov May 28, 2020
f17e3b9
explicitly define returned SO type
mshustov May 28, 2020
96fac96
workaround type
mshustov May 28, 2020
997e7fa
bump tslib to be compatible with ts v3.9
mshustov May 28, 2020
8b2ecc8
test private property
mshustov May 28, 2020
a7bcdcf
rebuild kbn-pm
mshustov May 28, 2020
626b710
Fix ts errors for beats management
nchaulet May 28, 2020
baa6209
Merge pull request #1 from nchaulet/ts-update-beats-cm
mshustov May 29, 2020
20e8e47
Fix type inference broken by the TS 3.9 upgrade
weltenwort May 29, 2020
315c7a0
Fix ingest manager saved object attributes typings
nchaulet May 29, 2020
ad99021
Fix TS errors in cross_cluster_replication and index_management.
cjcenizal May 29, 2020
efe7b08
Fix TS error in Watcher.
cjcenizal May 29, 2020
dea0122
Merge pull request #3 from nchaulet/fix-ingest-manager-ts-upgrade
mshustov May 30, 2020
2b4a810
Merge remote-tracking branch 'origin/ts-update' into ts-update
mshustov Jun 2, 2020
bc4ef14
roll back colorRange wrong type
mshustov Jun 2, 2020
c1d22c1
Merge branch 'master' into ts-update
mshustov Jun 2, 2020
fe04a00
Merge pull request #2 from weltenwort/logs-metrics-ui-update-to-ts-3-9
mshustov Jun 2, 2020
8fd55b2
Merge remote-tracking branch 'origin/ts-update' into ts-update
mshustov Jun 2, 2020
a75a205
fix security plugin types
legrego Jun 2, 2020
3caa679
TypeScript 3.9 fixes for APM
smith Jun 2, 2020
ffe3338
Fix ColorRange types.
walterra Jun 3, 2020
3c7e50b
fix actions & alerts errors. ByGidi
mshustov Jun 4, 2020
5a790f7
Merge branch 'master' into ts-update
mshustov Jun 4, 2020
7b39e4f
Merge remote-tracking branch 'origin/ts-update' into ts-update
mshustov Jun 4, 2020
f8b8e99
fix lists error
mshustov Jun 4, 2020
535afb3
More APM fixes
smith Jun 4, 2020
cf406fb
Merge branch 'ts-update' of https://github.com/restrry/kibana into ts…
smith Jun 4, 2020
beee8d2
Merge remote-tracking branch 'origin/ts-update' into ts-update
mshustov Jun 4, 2020
3d39cd5
fix platform type error
mshustov Jun 4, 2020
7579678
Fix visualizations types.
lukeelmers Jun 4, 2020
fa094a6
Fix data plugin types.
lukeelmers Jun 4, 2020
4113e83
Merge remote-tracking branch 'origin/ts-update' into ts-update
mshustov Jun 5, 2020
888b90b
Merge branch 'master' into ts-update
mshustov Jun 5, 2020
7951f77
bump TS version to 3.9.5
mshustov Jun 5, 2020
403205c
Fix telemetry TS errors
afharo Jun 5, 2020
90cd6d5
Fix dashboard code
Jun 5, 2020
4a4bd7f
Adding Canvas Fixes for TS 3.9
clintandrewhall Jun 5, 2020
6b920ab
Fix case and security_solution types
patrykkopycinski Jun 7, 2020
ff64040
Merge remote-tracking branch 'origin/ts-update' into ts-update
mshustov Jun 8, 2020
02516af
Merge branch 'master' into ts-update
mshustov Jun 8, 2020
68c5c91
Merge remote-tracking branch 'origin/ts-update' into ts-update
mshustov Jun 8, 2020
a72a9e3
roll back to the old export syntax. new one might cause problems in a…
mshustov Jun 8, 2020
987b4a0
update docs
mshustov Jun 8, 2020
368197f
Fix timelion code
Jun 8, 2020
aac2380
Fix meta
patrykkopycinski Jun 8, 2020
b0b4d83
Fix types
patrykkopycinski Jun 8, 2020
e2d6e7d
Merge remote-tracking branch 'origin/ts-update' into ts-update
mshustov Jun 9, 2020
f25e739
Merge branch 'master' into ts-update
mshustov Jun 9, 2020
b49dad5
fix type errors om ingest_manager
mshustov Jun 9, 2020
fdb016c
bump babel deps
mshustov Jun 9, 2020
3256c88
enable private props & methods syntax
mshustov Jun 9, 2020
4ff4b54
update kbn-pm dist
mshustov Jun 9, 2020
16a8300
whitelist 0BSD license
mshustov Jun 9, 2020
e98c40a
use @babel/plugin-proposal-private-methods in default set as well
mshustov Jun 9, 2020
04d9594
disable new babel plugins
mshustov Jun 9, 2020
64f08da
Revert "disable new babel plugins"
mshustov Jun 9, 2020
4218caf
cleanup security_solution types
patrykkopycinski Jun 10, 2020
e45065c
Merge remote-tracking branch 'origin/ts-update' into ts-update
mshustov Jun 10, 2020
87a2846
Merge branch 'master' into ts-update
mshustov Jun 10, 2020
babcc16
Merge branch 'master' into ts-update
mshustov Jun 10, 2020
37e3263
Fixes type error for newer TypeScript
FrankHassanabad Jun 10, 2020
cf62228
Merge pull request #4 from FrankHassanabad/fix-for-type
mshustov Jun 10, 2020
a887ff0
Merge branch 'master' into ts-update
elasticmachine Jun 11, 2020
4baf675
Merge remote-tracking branch 'origin/ts-update' into ts-update
mshustov Jun 11, 2020
d26ff2c
update docs
mshustov Jun 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"**/@types/angular": "^1.6.56",
"**/@types/hoist-non-react-statics": "^3.3.1",
"**/@types/chai": "^4.2.11",
"**/typescript": "3.7.2",
"**/typescript": "3.9.3",
"**/graphql-toolkit/lodash": "^4.17.13",
"**/hoist-non-react-statics": "^3.3.2",
"**/isomorphic-git/**/base64-js": "^1.2.1",
Expand Down Expand Up @@ -273,7 +273,7 @@
"tinygradient": "0.4.3",
"tinymath": "1.2.1",
"topojson-client": "3.0.0",
"tslib": "^1.9.3",
"tslib": "^2.0.0",
"type-detect": "^4.0.8",
"ui-select": "0.19.8",
"url-loader": "2.2.0",
Expand Down Expand Up @@ -396,8 +396,8 @@
"@types/uuid": "^3.4.4",
"@types/vinyl-fs": "^2.4.11",
"@types/zen-observable": "^0.8.0",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"angular-mocks": "^1.7.9",
"archiver": "^3.1.1",
"axe-core": "^3.4.1",
Expand Down Expand Up @@ -497,7 +497,7 @@
"supertest-as-promised": "^4.0.2",
"tape": "^4.13.0",
"tree-kill": "^1.2.2",
"typescript": "3.7.2",
"typescript": "3.9.3",
mshustov marked this conversation as resolved.
Show resolved Hide resolved
"typings-tester": "^0.3.2",
"vinyl-fs": "^3.0.3",
"xml2js": "^0.4.22",
Expand Down
2 changes: 1 addition & 1 deletion packages/elastic-datemath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"moment": "^2.24.0"
},
"dependencies": {
"tslib": "^1.9.3"
"tslib": "^2.0.0"
},
"peerDependencies": {
"moment": "^2.24.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-kibana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"homepage": "https://github.com/elastic/eslint-config-kibana#readme",
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.8.0",
"eslint-plugin-babel": "^5.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"@babel/cli": "^7.8.4",
"@kbn/dev-utils": "1.0.0",
"@kbn/babel-preset": "1.0.0",
"typescript": "3.7.2"
"typescript": "3.9.3"
}
}
4 changes: 4 additions & 0 deletions packages/kbn-babel-preset/common_preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const plugins = [
// Nullish coalescing proposal is stage 3 (https://github.com/tc39/proposal-nullish-coalescing)
// Need this since we are using TypeScript 3.7+
require.resolve('@babel/plugin-proposal-nullish-coalescing-operator'),

// Proposal is on stage 4 (https://github.com/tc39/proposal-export-ns-from)
// Need this since we are using TypeScript 3.8+
require.resolve('@babel/plugin-proposal-export-namespace-from'),
];

module.exports = {
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-export-namespace-from": "^7.10.1",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@babel/preset-env": "^7.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-config-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"kbn:bootstrap": "yarn build"
},
"devDependencies": {
"typescript": "3.7.2"
"typescript": "3.9.3"
},
"peerDependencies": {
"joi": "^13.5.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"moment": "^2.24.0",
"rxjs": "^6.5.3",
"tree-kill": "^1.2.2",
"tslib": "^1.9.3"
"tslib": "^2.0.0"
},
"devDependencies": {
"typescript": "3.7.2",
"typescript": "3.9.3",
"@kbn/expect": "1.0.0",
"chance": "1.0.18"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"del": "^5.1.0",
"getopts": "^2.2.4",
"supports-color": "^7.0.0",
"typescript": "3.7.2"
"typescript": "3.9.3"
},
"dependencies": {
"intl-format-cache": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-plugin-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@types/through2": "^2.0.35",
"@types/through2-map": "^3.0.0",
"@types/vinyl": "^2.0.4",
"typescript": "3.7.2"
"typescript": "3.9.3"
},
"peerDependencies": {
"@kbn/babel-preset": "1.0.0"
Expand Down
4,923 changes: 2,603 additions & 2,320 deletions packages/kbn-pm/dist/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/kbn-pm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@
"strip-ansi": "^4.0.0",
"strong-log-transformer": "^2.1.0",
"tempy": "^0.3.0",
"typescript": "3.7.2",
"typescript": "3.9.3",
"unlazy-loader": "^0.1.3",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10",
"wrap-ansi": "^3.0.1",
"write-pkg": "^4.0.0"
},
"dependencies": {
"tslib": "^1.9.3"
"tslib": "^2.0.0"
}
}
6 changes: 2 additions & 4 deletions src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@
* specific language governing permissions and limitations
* under the License.
*/
import * as Public from './public';
import * as Server from './server';

export { Public, Server };
export * as Public from './public';
export * as Server from './server';
Copy link
Contributor

Choose a reason for hiding this comment

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

This syntax (and private member properties) seems like it might break api-extractor, or at least it's an untested syntax: microsoft/rushstack#1866 (comment)

Maybe we should hold off on making these changes until after this PR is merged to be sure we don't break compatibility with api-extractor (unless this was the only way to resolve a type error?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did the changes to test eslint parser update, we can roll them back.

6 changes: 3 additions & 3 deletions src/core/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class Server {
private readonly status: StatusService;
private readonly coreApp: CoreApp;

private pluginsInitialized?: boolean;
#pluginsInitialized?: boolean;
private coreStart?: InternalCoreStart;

constructor(
Expand Down Expand Up @@ -179,7 +179,7 @@ export class Server {
};

const pluginsSetup = await this.plugins.setup(coreSetup);
this.pluginsInitialized = pluginsSetup.initialized;
this.#pluginsInitialized = pluginsSetup.initialized;

await this.legacy.setup({
core: { ...coreSetup, plugins: pluginsSetup, rendering: renderingSetup },
Expand All @@ -198,7 +198,7 @@ export class Server {
const elasticsearchStart = await this.elasticsearch.start();
const savedObjectsStart = await this.savedObjects.start({
elasticsearch: elasticsearchStart,
pluginsInitialized: this.pluginsInitialized,
pluginsInitialized: this.#pluginsInitialized,
});
const capabilitiesStart = this.capabilities.start();
const uiSettingsStart = await this.uiSettings.start();
Expand Down
1 change: 1 addition & 0 deletions src/dev/i18n/extractors/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export function* extractCodeMessages(buffer, reporter) {
'dynamicImport',
'nullishCoalescingOperator',
'optionalChaining',
'exportNamespaceFrom',
],
});
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export const globals = (specService: SpecDefinitionsService) => {
fields: {
'{field}': {
fragment_size: 20,
number_of_fragments: 3,
Copy link
Contributor

Choose a reason for hiding this comment

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

@jloleysens Do you know if it's safe to remove this?

...highlightOptions,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
* Once we hit a major version, we can remove support for older style URLs and get rid of this logic.
*/
export function migrateAppState(
appState: { [key: string]: unknown } & DashboardAppState,
appState: { [key: string]: any } & DashboardAppState,
kibanaVersion: string,
usageCollection?: UsageCollectionSetup
): DashboardAppState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ export function getSampleDashboardPanel<TEmbeddableInput extends EmbeddableInput
y: 0,
i: overrides.explicitInput.id,
},
type: overrides.type,
explicitInput: overrides.explicitInput,
...overrides,
};
}
4 changes: 2 additions & 2 deletions src/plugins/data/public/search/legacy/fetch_soon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function fetchSoon(
* @param ms The number of milliseconds to wait
* @return Promise<any> A promise that resolves with the result of executing the function
*/
function delay(fn: Function, ms: number) {
function delay<T>(fn: (...args: any) => T, ms: number): Promise<T> {
return new Promise((resolve) => {
setTimeout(() => resolve(fn()), ms);
});
Expand Down Expand Up @@ -74,7 +74,7 @@ async function delayedFetch(
const i = requestsToFetch.length;
requestsToFetch = [...requestsToFetch, request];
requestOptions = [...requestOptions, options];
const responses = await (fetchInProgress =
const responses: SearchResponse[] = await (fetchInProgress =
fetchInProgress ||
delay(() => {
const response = callClient(requestsToFetch, requestOptions, fetchHandlers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ export const withEmbeddableSubscription = <

render() {
return (
<WrappedComponent
input={this.state.input}
output={this.state.output}
embeddable={this.props.embeddable}
{...this.props}
/>
<WrappedComponent input={this.state.input} output={this.state.output} {...this.props} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

embeddable is defined in props

);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const SelectField = ({ field, euiFieldProps, ...rest }: Props) => {
onChange={(e) => {
field.setValue(e.target.value);
}}
options={[]}
hasNoInitialSelection={true}
isInvalid={isInvalid}
data-test-subj="select"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export const useField = <T>(
validationTypeToValidate: validationType,
});

if ((validationErrors as Promise<ValidationError[]>).then) {
if (Reflect.has(validationErrors, 'then')) {
return (validationErrors as Promise<ValidationError[]>).then(onValidationErrors);
}
return onValidationErrors(validationErrors as ValidationError[]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const getTelemetrySavedObject: GetTelemetrySavedObject = async (
repository: SavedObjectsClientContract
) => {
try {
const { attributes } = await repository.get('telemetry', 'telemetry');
const { attributes } = await repository.get<TelemetrySavedObject>('telemetry', 'telemetry');
return attributes;
} catch (error) {
if (SavedObjectsErrorHelpers.isNotFoundError(error)) {
Expand Down
38 changes: 20 additions & 18 deletions src/plugins/vis_type_timelion/public/components/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<JQuery<HTMLElement>>();
const [chartElem, setChartElem] = useState<JQuery<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) {
Expand Down Expand Up @@ -248,20 +248,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) {
Expand All @@ -281,14 +281,16 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) {

const y = currentPoint[1];

if (y != null && legendValueNumbers) {
let label = y.toFixed(precision);
if (series.yaxis.tickFormatter) {
label = series.yaxis.tickFormatter(Number(label), series.yaxis);
if (legendValueNumbers) {
if (y == null) {
legendValueNumbers.eq(i).empty();
} else {
let label = y.toFixed(precision);
if (series.yaxis.tickFormatter) {
label = series.yaxis.tickFormatter(Number(label), series.yaxis);
}
legendValueNumbers.eq(i).text(`(${label})`);
}
legendValueNumbers.eq(i).text(`(${label})`);
} else {
legendValueNumbers.eq(i).empty();
}
}
},
Expand All @@ -308,7 +310,7 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) {
if (legendCaption) {
legendCaption.html(emptyCaption);
}
each(legendValueNumbers, (num: Node) => {
each(legendValueNumbers!, (num: Node) => {
$(num).empty();
});
}, [legendCaption, legendValueNumbers]);
Expand Down
6 changes: 3 additions & 3 deletions test/common/services/security/test_user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export async function createTestUserService(
const config = getService('config');
// @ts-ignore browser service is not normally available in common.
const browser: Browser | void = hasService('browser') && getService('browser');
const testSubjects: TestSubjects | void =
// @ts-ignore testSubject service is not normally available in common.
hasService('testSubjects') && getService('testSubjects');
const testSubjects: TestSubjects | undefined =
// testSubject service is not normally available in common.
hasService('testSubjects') ? (getService('testSubjects' as any) as TestSubjects) : undefined;
const kibanaServer = getService('kibanaServer');

const enabledPlugins = config.get('security.disableTestUser')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
},
"devDependencies": {
"@kbn/plugin-helpers": "9.0.2",
"typescript": "3.7.2"
"typescript": "3.9.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"build": "rm -rf './target' && tsc"
},
"devDependencies": {
"typescript": "3.7.2"
"typescript": "3.9.3"
}
}
2 changes: 1 addition & 1 deletion test/plugin_functional/plugins/core_plugin_a/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"build": "rm -rf './target' && tsc"
},
"devDependencies": {
"typescript": "3.7.2"
"typescript": "3.9.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"build": "rm -rf './target' && tsc"
},
"devDependencies": {
"typescript": "3.7.2"
"typescript": "3.9.3"
}
}
Loading