feat(client): ts-migrate client/src/utils (#42666)
* rename js files to ts * start migrating ajax * finish migrating ajax * migrate algolia-locale-setup * migrate format * migrate format.test * migrate get-words * install axios for types in handled-error * migrate handled-error * migrate handled-error.test * migrate report-error * migrate script-loaders * migrate to-learn-path * correct renamed imports * remove unnecessary type assertions in searchBar * remove unnecessary global comment * remove unnecessary max-len enable/disable * change axios imports to type imports * revert to .then() from await * use UserType from redux/prop-types * replace assertion with generic type * revert format to JS * remove unused getArticleById() * update putUpdateUserFlag() to use Record * remove unnecessary envData cast * update algolia-locale-setup types * remove invalid key property
This commit is contained in:
7
client/src/utils/report-error.ts
Normal file
7
client/src/utils/report-error.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// TODO: integrate with Sentry?
|
||||
export function reportClientSideError(
|
||||
e: Error,
|
||||
message = 'Unhandled error'
|
||||
): void {
|
||||
return console.error(`Client: ${message}`, e);
|
||||
}
|
Reference in New Issue
Block a user