mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-06 20:16:57 +00:00
fix logger Data type
This commit is contained in:
parent
f61d71ac8c
commit
03edc33424
1 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue