simian 0.2.0

A command-line tool for exploring and implementing Machine Learning algorithms in Rust.
1
2
3
4
5
6
7
8
9
10
11
12
13
import { z } from 'zod'

import { LatexInlineElementSchema } from '../addon/latex-inline/schema'
import { TextSchema } from '../addon/text/schema'
import { ValElementSchema } from '../addon/val/schema'

export const inlineSchemas = [
  LatexInlineElementSchema,
  ValElementSchema,
] as const

export const InlineElementSchema = z.discriminatedUnion('type', inlineSchemas)
export const TextElementSchema = z.union([InlineElementSchema, TextSchema])