mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-05-07 12:26:41 +02:00
fix(log): Avoid type conflict (#347)
* Avoid type conflict * Prettier format * Make extras optional * Rename extras to keyValues * Remove empty initial object
This commit is contained in:
@@ -4,7 +4,8 @@ import { listen, UnlistenFn } from "@tauri-apps/api/event";
|
||||
export type LogOptions = {
|
||||
file?: string;
|
||||
line?: number;
|
||||
} & Record<string, string | undefined>;
|
||||
keyValues?: Record<string, string | undefined>;
|
||||
};
|
||||
|
||||
enum LogLevel {
|
||||
/**
|
||||
@@ -50,7 +51,7 @@ async function log(
|
||||
return name.length > 0 && location !== "[native code]";
|
||||
});
|
||||
|
||||
const { file, line, ...keyValues } = options ?? {};
|
||||
const { file, line, keyValues } = options ?? {};
|
||||
|
||||
let location = filtered?.[0]?.filter((v) => v.length > 0).join("@");
|
||||
if (location === "Error") {
|
||||
|
||||
Reference in New Issue
Block a user