Public
Script
1
2
3
4
5
6
7
8
9
10
11
12
import { Type } from "npm:@sinclair/typebox"
import { Value } from "npm:@sinclair/typebox/value"
const tExecute = Type.Union(
[Type.Array(Type.Any()), Type.Record(Type.String(), Type.Any())],
{
title: "StatementArg",
description: "List of arguments to be used in the given statement",
},
)
console.log(Value.Convert(tExecute, ["hi", null, 1, 2, true, false]))
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
August 20, 2024