chore: type src/logger (#10815)
This commit is contained in:
parent
84c8a627b2
commit
9215a31fa2
|
|
@ -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());
|
||||
},
|
||||
|
|
@ -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<string, any>) {
|
||||
return (dispatch: Dispatch<never>) =>
|
||||
dispatch({
|
||||
type: LOG_EVENT,
|
||||
payload: {
|
||||
Loading…
Reference in New Issue