mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
chore: migrate from ts-matches to zod across all TypeScript packages
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { object, string } from 'ts-matches'
|
||||
import { z } from 'zod'
|
||||
import { Effects } from '../Effects'
|
||||
import { Origin } from './Origin'
|
||||
import { AddSslOptions, BindParams } from '../osBindings'
|
||||
@@ -69,9 +69,8 @@ export type BindOptionsByProtocol =
|
||||
| BindOptionsByKnownProtocol
|
||||
| (BindOptions & { protocol: null })
|
||||
|
||||
const hasStringProtocol = object({
|
||||
protocol: string,
|
||||
}).test
|
||||
const hasStringProtocol = (v: unknown): v is { protocol: string } =>
|
||||
z.object({ protocol: z.string() }).safeParse(v).success
|
||||
|
||||
export class MultiHost {
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user