From eeec63c7dde3027f4a81ccd814f31cc3e2fc2cb0 Mon Sep 17 00:00:00 2001 From: Erik Ritter Date: Mon, 24 Feb 2020 14:30:35 -0800 Subject: [PATCH] [SIP-36] Migrate setupApp.js to setupApp.ts (#9180) --- superset-frontend/package-lock.json | 15 ++++++++++++ superset-frontend/package.json | 1 + .../src/setup/{setupApp.js => setupApp.ts} | 23 ++++++++++++++----- 3 files changed, 33 insertions(+), 6 deletions(-) rename superset-frontend/src/setup/{setupApp.js => setupApp.ts} (80%) diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index ab4586f4b251f..5421f93fb10f2 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -4853,6 +4853,15 @@ "integrity": "sha512-DC8xTuW/6TYgvEg3HEXS7cu9OijFqprVDXXiOcdOKZCU/5PJNLZU37VVvmZHdtMiGOa8wAA/We+JzbdxFzQTRQ==", "dev": true }, + "@types/jquery": { + "version": "3.3.32", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.32.tgz", + "integrity": "sha512-UKoof2mnV/X1/Ix2g+V2Ny5sgHjV8nK/UJbiYxuo4zPwzGyFlZ/mp4KaePb2VqQrqJctmcDQNA57buU84/2uIw==", + "dev": true, + "requires": { + "@types/sizzle": "*" + } + }, "@types/json-schema": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", @@ -4952,6 +4961,12 @@ "@types/react": "*" } }, + "@types/sizzle": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", + "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==", + "dev": true + }, "@types/source-list-map": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", diff --git a/superset-frontend/package.json b/superset-frontend/package.json index 861dacb9f718e..f51844979c056 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -161,6 +161,7 @@ "@babel/preset-react": "^7.0.0", "@babel/register": "^7.5.5", "@types/jest": "^23.3.5", + "@types/jquery": "^3.3.32", "@types/react": "^16.4.18", "@types/react-dom": "^16.0.9", "@types/react-json-tree": "^0.6.11", diff --git a/superset-frontend/src/setup/setupApp.js b/superset-frontend/src/setup/setupApp.ts similarity index 80% rename from superset-frontend/src/setup/setupApp.js rename to superset-frontend/src/setup/setupApp.ts index e0969f9a0f67a..d1c3dd9fef30d 100644 --- a/superset-frontend/src/setup/setupApp.js +++ b/superset-frontend/src/setup/setupApp.ts @@ -21,7 +21,7 @@ import $ from 'jquery'; import { SupersetClient } from '@superset-ui/connection'; import getClientErrorObject from '../utils/getClientErrorObject'; -function showApiMessage(resp) { +function showApiMessage(resp: { severity?: string; message: string }) { const template = '
' + '