chore: type src/logger (#10815)

This commit is contained in:
Erik Ritter 2020-11-25 08:21:44 -08:00 committed by GitHub
parent 84c8a627b2
commit 9215a31fa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -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());
},

View File

@ -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: {