diff --git a/superset-frontend/src/logger/LogUtils.js b/superset-frontend/src/logger/LogUtils.ts similarity index 99% rename from superset-frontend/src/logger/LogUtils.js rename to superset-frontend/src/logger/LogUtils.ts index 17e4a0f699..bfb7a7f112 100644 --- a/superset-frontend/src/logger/LogUtils.js +++ b/superset-frontend/src/logger/LogUtils.ts @@ -59,7 +59,7 @@ export const LOG_EVENT_TYPE_USER = new Set([ ]); export const Logger = { - // note that this returns ms since page load, NOT ms since epoc + // note that this returns ms since page load, NOT ms since epoch getTimestamp() { return Math.round(window.performance.now()); }, diff --git a/superset-frontend/src/logger/actions/index.js b/superset-frontend/src/logger/actions/index.ts similarity index 85% rename from superset-frontend/src/logger/actions/index.js rename to superset-frontend/src/logger/actions/index.ts index f319068e61..c89ff0ca86 100644 --- a/superset-frontend/src/logger/actions/index.js +++ b/superset-frontend/src/logger/actions/index.ts @@ -16,10 +16,12 @@ * specific language governing permissions and limitations * under the License. */ +import { Dispatch } from 'react-redux'; + export const LOG_EVENT = 'LOG_EVENT'; -export function logEvent(eventName, eventData) { - return dispatch => +export function logEvent(eventName: string, eventData: Record) { + return (dispatch: Dispatch) => dispatch({ type: LOG_EVENT, payload: {