Remove unwanted types

This commit is contained in:
RMidhunSuresh 2021-11-11 15:35:51 +05:30
parent 425a3c85a9
commit 09851600f7

View file

@ -19,25 +19,6 @@ import {LogLevel, LogFilter} from "./LogFilter";
import type {LogLevelOrNull} from "./LogFilter"; import type {LogLevelOrNull} from "./LogFilter";
import type {BaseLogger} from "./BaseLogger"; import type {BaseLogger} from "./BaseLogger";
type LogItemWithLabel = {
l: string;
[key: string]: unknown;
};
type LogItemNetwork = {
t: "network";
method: string;
url: string;
[key: string]: unknown;
}
type LogItemRef = {
ref: number;
[key: string]: unknown;
}
type LogItemValues = LogItemWithLabel | LogItemNetwork | LogItemRef;
interface ISerializedItem { interface ISerializedItem {
s: number; s: number;
d: number | null; d: number | null;
@ -52,6 +33,16 @@ interface ISerializedItem {
c?: Array<ISerializedItem>; c?: Array<ISerializedItem>;
}; };
type LogItemValues = {
l?: string;
t?: string;
id?: unknown;
status?: string | number;
refId?: number;
ref?: number;
[key: string]: any
}
export type LabelOrValues = string | LogItemValues; export type LabelOrValues = string | LogItemValues;
export type FilterCreator = ((filter: LogFilter, item: LogItem) => LogFilter) | null; export type FilterCreator = ((filter: LogFilter, item: LogItem) => LogFilter) | null;
export type LogCallback = (item: LogItem) => unknown; export type LogCallback = (item: LogItem) => unknown;