Configurable
type Configurable<TComponent> = TComponent & { Config: InlineConfig<TComponent> Expand0: Configurable<TComponent> Expand1: Configurable<TComponent> Expand10: Configurable<TComponent> Expand2: Configurable<TComponent> Expand3: Configurable<TComponent> Expand4: Configurable<TComponent> Expand5: Configurable<TComponent> Expand6: Configurable<TComponent> Expand7: Configurable<TComponent> Expand8: Configurable<TComponent> Expand9: Configurable<TComponent> ExpandAll: Configurable<TComponent> withOptions: (options) => Configurable<TComponent>}Utility-type used to enhance Inspect.Values with Configurable.withOptions and chainable inline configuration.
Type Declaration
Section titled “Type Declaration”Config
Section titled “Config”Config: InlineConfig<TComponent>Use chainable inline configuration in a template.
Complete configuration and return component with Ok
Will override global options and options passed with withOptions
Example
Section titled “Example”<script> import Inspect from 'svelte-inspect-value' import data from './data.js'</script>
<Inspect.Values.Expand0.Config.Borderless.DoubleQuotes.DarkTheme.Ok {data} />Expand0
Section titled “Expand0”Expand0: Configurable<TComponent>Set initial expand depth to 0
Expand1
Section titled “Expand1”Expand1: Configurable<TComponent>Set initial expand depth to 1
Expand10
Section titled “Expand10”Expand10: Configurable<TComponent>Set initial expand depth to 10
Expand2
Section titled “Expand2”Expand2: Configurable<TComponent>Set initial expand depth to 2
Expand3
Section titled “Expand3”Expand3: Configurable<TComponent>Set initial expand depth to 3
Expand4
Section titled “Expand4”Expand4: Configurable<TComponent>Set initial expand depth to 4
Expand5
Section titled “Expand5”Expand5: Configurable<TComponent>Set initial expand depth to 5
Expand6
Section titled “Expand6”Expand6: Configurable<TComponent>Set initial expand depth to 6
Expand7
Section titled “Expand7”Expand7: Configurable<TComponent>Set initial expand depth to 7
Expand8
Section titled “Expand8”Expand8: Configurable<TComponent>Set initial expand depth to 8
Expand9
Section titled “Expand9”Expand9: Configurable<TComponent>Set initial expand depth to 9
ExpandAll
Section titled “ExpandAll”ExpandAll: Configurable<TComponent>Initially expand all nodes (max 30)
withOptions()
Section titled “withOptions()”withOptions: (options) => Configurable<TComponent>Configure Inspect.Values or other variants created with withOptions or configured
The component will also inherit options set with setGlobalInspectOptions or InspectOptionsProvider.
“Global” options will be overriden by options passed to this method.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Configurable<TComponent>
Example
Section titled “Example”<script> import Inspect from 'svelte-inspect-value'
const InspectValues = Inspect.withOptions(() => ({ theme: 'plain', showPreview: false })) const Ins = InspectValues.withOptions(() => ({ showTypes: false })) // inherits from InspectValues
let str = 'hi' let obj = {}</script>
<InspectValues {str} {obj} arr={[1, 2, 3]} />Type Parameters
Section titled “Type Parameters”TComponent
Section titled “TComponent”TComponent = Component