Skip to content

TypeViewProps

type TypeViewProps<Value, Type> = {
display?: string
forceType?: boolean
key?: PropertyKey
keyDelim?: string
keyPrefix?: string
keyStyle?: HTMLAttributes<HTMLDivElement>['style']
length?: number
match?: boolean
note?: {
description?: string
title?: string
}
path?: PropertyKey[]
showKey?: boolean
showLength?: boolean
type?: Type
value: Value
}

Value = unknown

Type = ValueType

optional display: string;

Representation of value.

Use to customize how a value is represented while still being able to pass the original value for other purposes


optional forceType: boolean;

Force type indicator visibility for this node


optional key: PropertyKey;

optional keyDelim: string;

Key delimiter


optional keyPrefix: string;

Prefix for key e.g. “get” or “static”


optional keyStyle: HTMLAttributes<HTMLDivElement>["style"];

Style overrides for key


optional length: number;

Number of child entries / items. Also determines if expandables can be expanded (needs to be not undefined/null/zero).


optional match: boolean;

The node is a search match


optional note: {
description?: string;
title?: string;
};

Title / description for node note, e.g. “parsed” for parsed JSON strings

optional description: string;
optional title: string;

optional path: PropertyKey[];

Path of the node


optional showKey: boolean;

Should key be shown


optional showLength: boolean;

Should the node show it’s given length / count


optional type: Type;

Type of the value


value: Value