simian 0.1.0

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

import { CodeBlockElementSchema } from '../addon/code-block/schema'
import { HeadingElementSchema } from '../addon/heading/schema'
import { ParagraphElementSchema } from '../addon/paragraph/schema'
import { SubTitleElementSchema } from '../addon/subtitle/schema'
import { TitleElementSchema } from '../addon/title/schema'

export const blockSchemas = [
  CodeBlockElementSchema,
  HeadingElementSchema,
  ParagraphElementSchema,
  SubTitleElementSchema,
  TitleElementSchema,
] as const

export const BlockElementSchema = z.discriminatedUnion('type', blockSchemas)