Remove example data types

This commit is contained in:
Andrew Kingston 2025-01-20 16:19:28 +00:00
parent d872ee19d0
commit f0594c63d5
No known key found for this signature in database
1 changed files with 2 additions and 16 deletions

View File

@ -42,28 +42,14 @@
snippets: $snippets, snippets: $snippets,
}) as any[] }) as any[]
// Enrich bindings with evaluations and highlighted HTML // Deeply set values for all readable bindings
const enrichedBindings: any[] = bindings.map((binding, idx) => { const enrichedBindings: any[] = bindings.map((binding, idx) => {
return { return {
...binding, ...binding,
value: bindingEvaluations[idx], value: bindingEvaluations[idx],
} }
}) })
let context = {}
let context = {
_dataTypes: {
date: new Date(),
string: "foo",
number: 1234,
undefined: undefined,
null: null,
true: true,
false: false,
array: [1, 2, 3],
object: { foo: "bar" },
error: new Error(),
},
}
for (let binding of enrichedBindings) { for (let binding of enrichedBindings) {
Helpers.deepSet(context, binding.readableBinding, binding.value) Helpers.deepSet(context, binding.readableBinding, binding.value)
} }