mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-12 15:57:12 +02:00
updates eslint config, fixes linting errors
This commit is contained in:
@ -41,7 +41,7 @@ const serializePrimitive = (
|
||||
}
|
||||
};
|
||||
|
||||
export const serializeList = (obj: unknown[], accessPath: string = "") => {
|
||||
export const serializeList = (obj: unknown[], accessPath = "") => {
|
||||
const doc = null;
|
||||
const value = obj.map((item, index) => {
|
||||
if (
|
||||
@ -65,10 +65,7 @@ export const serializeList = (obj: unknown[], accessPath: string = "") => {
|
||||
doc,
|
||||
};
|
||||
};
|
||||
export const serializeDict = (
|
||||
obj: Record<string, unknown>,
|
||||
accessPath: string = "",
|
||||
) => {
|
||||
export const serializeDict = (obj: Record<string, unknown>, accessPath = "") => {
|
||||
const doc = null;
|
||||
const value = Object.entries(obj).reduce(
|
||||
(acc, [key, val]) => {
|
||||
@ -87,7 +84,7 @@ export const serializeDict = (
|
||||
|
||||
return acc;
|
||||
},
|
||||
<Record<string, SerializedObject>>{},
|
||||
{} as Record<string, SerializedObject>,
|
||||
);
|
||||
|
||||
return {
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { SerializedObject } from "../types/SerializedObject";
|
||||
|
||||
export type State = {
|
||||
export interface State {
|
||||
type: string;
|
||||
name: string;
|
||||
value: Record<string, SerializedObject> | null;
|
||||
readonly: boolean;
|
||||
doc: string | null;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits a full access path into its atomic parts, separating attribute names, numeric
|
||||
@ -110,7 +110,7 @@ function getOrCreateItemInContainer(
|
||||
function getContainerItemByKey(
|
||||
container: Record<string, SerializedObject> | SerializedObject[],
|
||||
key: string,
|
||||
allowAppend: boolean = false,
|
||||
allowAppend = false,
|
||||
): SerializedObject {
|
||||
const processedKey = parseSerializedKey(key);
|
||||
|
||||
|
Reference in New Issue
Block a user