Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkal committed May 24, 2024
1 parent 9160b62 commit 691d51c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"packageManager": "[email protected]",
"scripts": {
"prepare": "pnpm build",
"lint": "eslint .",
"lint": "eslint --max-warnings=0 .",
"build": "tsc -p tsconfig.lib.json",
"dev": "cd test/fixtures && tsx",
"test": "vitest run"
Expand Down
6 changes: 1 addition & 5 deletions src/zod-procedure.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import {Procedure} from '@trpc/server'
import {z} from 'zod'
import zodToJsonSchema from 'zod-to-json-schema'
import type {Result, ParsedProcedure} from './types'

function getInnerType(zodType: z.ZodType): z.ZodType {
if (zodType instanceof z.ZodOptional) {
return getInnerType(zodType._def.innerType as z.ZodType)
}
if (zodType instanceof z.ZodNullable) {
if (zodType instanceof z.ZodOptional || zodType instanceof z.ZodNullable) {
return getInnerType(zodType._def.innerType as z.ZodType)
}
if (zodType instanceof z.ZodEffects) {
Expand Down

0 comments on commit 691d51c

Please sign in to comment.