@@ -184,24 +184,22 @@ const onPipeline: Producer = (
184184) => {
185185 const target = def [ isResponse ? "out" : "in" ] ;
186186 const opposite = def [ isResponse ? "in" : "out" ] ;
187- if ( isSchema < $ZodTransform > ( target , "transform" ) ) {
188- const opposingType = next ( opposite ) ;
189- const targetType = getTransformedType ( target , makeSample ( opposingType ) ) ;
190- const resolutions : Partial <
191- Record < NonNullable < typeof targetType > , ts . KeywordTypeSyntaxKind >
192- > = {
193- number : ts . SyntaxKind . NumberKeyword ,
194- bigint : ts . SyntaxKind . BigIntKeyword ,
195- boolean : ts . SyntaxKind . BooleanKeyword ,
196- string : ts . SyntaxKind . StringKeyword ,
197- undefined : ts . SyntaxKind . UndefinedKeyword ,
198- object : ts . SyntaxKind . ObjectKeyword ,
199- } ;
200- return ensureTypeNode (
201- ( targetType && resolutions [ targetType ] ) || ts . SyntaxKind . AnyKeyword ,
202- ) ;
203- }
204- return next ( target ) ;
187+ if ( ! isSchema < $ZodTransform > ( target , "transform" ) ) return next ( target ) ;
188+ const opposingType = next ( opposite ) ;
189+ const targetType = getTransformedType ( target , makeSample ( opposingType ) ) ;
190+ const resolutions : Partial <
191+ Record < NonNullable < typeof targetType > , ts . KeywordTypeSyntaxKind >
192+ > = {
193+ number : ts . SyntaxKind . NumberKeyword ,
194+ bigint : ts . SyntaxKind . BigIntKeyword ,
195+ boolean : ts . SyntaxKind . BooleanKeyword ,
196+ string : ts . SyntaxKind . StringKeyword ,
197+ undefined : ts . SyntaxKind . UndefinedKeyword ,
198+ object : ts . SyntaxKind . ObjectKeyword ,
199+ } ;
200+ return ensureTypeNode (
201+ ( targetType && resolutions [ targetType ] ) || ts . SyntaxKind . AnyKeyword ,
202+ ) ;
205203} ;
206204
207205const onNull : Producer = ( ) => makeLiteralType ( null ) ;
0 commit comments