File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
ts-transformers/src/transformers Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -199,9 +199,7 @@ export const patternTool = (<
199199 fnOrRecipe : ( ( input : OpaqueRef < Required < T > > ) => any ) | RecipeFactory < T , any > ,
200200 extraParams ?: Opaque < E > ,
201201) : OpaqueRef < Omit < T , keyof E > > => {
202- const pattern = isRecipe ( fnOrRecipe )
203- ? fnOrRecipe
204- : recipe ( fnOrRecipe ) ;
202+ const pattern = isRecipe ( fnOrRecipe ) ? fnOrRecipe : recipe ( fnOrRecipe ) ;
205203
206204 return {
207205 pattern,
Original file line number Diff line number Diff line change @@ -313,7 +313,9 @@ function factoryFromRecipe<T, R>(
313313
314314 let argumentSchema : JSONSchema ;
315315
316- if ( typeof argumentSchemaArg === "string" || argumentSchemaArg === undefined ) {
316+ if (
317+ typeof argumentSchemaArg === "string" || argumentSchemaArg === undefined
318+ ) {
317319 // Create a writable schema from defaults
318320 const writableSchema : JSONSchemaMutable = createJsonSchema ( defaults , true ) ;
319321
Original file line number Diff line number Diff line change @@ -204,7 +204,10 @@ export class SchemaInjectionTransformer extends Transformer {
204204 if ( argsArray . length === 1 ) {
205205 // Single argument - must be the function
206206 recipeFunction = argsArray [ 0 ] ;
207- } else if ( argsArray . length === 2 && argsArray [ 0 ] && ts . isStringLiteral ( argsArray [ 0 ] ) ) {
207+ } else if (
208+ argsArray . length === 2 && argsArray [ 0 ] &&
209+ ts . isStringLiteral ( argsArray [ 0 ] )
210+ ) {
208211 // Two arguments with first being a string - second is the function
209212 recipeFunction = argsArray [ 1 ] ;
210213 }
@@ -220,7 +223,10 @@ export class SchemaInjectionTransformer extends Transformer {
220223
221224 // Only transform if there's an explicit type annotation
222225 if ( inputParam ?. type ) {
223- const toSchemaInput = createToSchemaCall ( context , inputParam . type ) ;
226+ const toSchemaInput = createToSchemaCall (
227+ context ,
228+ inputParam . type ,
229+ ) ;
224230
225231 const updated = factory . createCallExpression (
226232 node . expression ,
You can’t perform that action at this time.
0 commit comments