diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-03-21 20:38:04 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-03-27 19:51:42 -0400 |
| commit | 03edc334249940582aac3bdff0475d6174aec788 (patch) | |
| tree | 8c0a97a1edc44c104ea3643804b1c4d8b10eb4d5 | |
| parent | refactor mastodon API and preserve remote user agent for requests (diff) | |
| download | sharkey-03edc334249940582aac3bdff0475d6174aec788.tar.gz sharkey-03edc334249940582aac3bdff0475d6174aec788.tar.bz2 sharkey-03edc334249940582aac3bdff0475d6174aec788.zip | |
fix logger Data type
| -rw-r--r-- | packages/backend/src/logger.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/backend/src/logger.ts b/packages/backend/src/logger.ts index eb2b081220..79623768a8 100644 --- a/packages/backend/src/logger.ts +++ b/packages/backend/src/logger.ts @@ -19,7 +19,9 @@ type Context = { type Level = 'error' | 'success' | 'warning' | 'debug' | 'info'; export type Data = DataElement | DataElement[]; -export type DataElement = Record<string, unknown> | Error | string | null; +export type DataElement = DataObject | Error | string | null; +// https://stackoverflow.com/questions/61148466/typescript-type-that-matches-any-object-but-not-arrays +export type DataObject = Record<string, unknown> | (object & { length?: never; }); // eslint-disable-next-line import/no-default-export export default class Logger { |