@@ -208,28 +208,30 @@ class CodeGenProcess {
208
208
utils : {
209
209
Ts : this . config . Ts ,
210
210
formatDescription :
211
- this . schemaParserFabric . schemaFormatters . formatDescription ,
211
+ this . schemaParserFabric . schemaFormatters . formatDescription . bind (
212
+ this . schemaParserFabric . schemaFormatters ,
213
+ ) ,
212
214
internalCase : internalCase ,
213
215
classNameCase : pascalCase ,
214
216
pascalCase : pascalCase ,
215
- getInlineParseContent : this . schemaParserFabric . getInlineParseContent ,
216
- getParseContent : this . schemaParserFabric . getParseContent ,
217
- getComponentByRef : this . schemaComponentsMap . get ,
218
- parseSchema : this . schemaParserFabric . parseSchema ,
219
- checkAndAddNull : this . schemaParserFabric . schemaUtils . safeAddNullToType ,
217
+ getInlineParseContent : this . schemaParserFabric . getInlineParseContent . bind ( this . schemaParserFabric ) ,
218
+ getParseContent : this . schemaParserFabric . getParseContent . bind ( this . schemaParserFabric ) ,
219
+ getComponentByRef : this . schemaComponentsMap . get . bind ( this . schemaComponentsMap ) ,
220
+ parseSchema : this . schemaParserFabric . parseSchema . bind ( this . schemaParserFabric ) ,
221
+ checkAndAddNull : this . schemaParserFabric . schemaUtils . safeAddNullToType . bind ( this . schemaParserFabric . schemaUtils ) ,
220
222
safeAddNullToType :
221
- this . schemaParserFabric . schemaUtils . safeAddNullToType ,
223
+ this . schemaParserFabric . schemaUtils . safeAddNullToType . bind ( this . schemaParserFabric . schemaUtils ) ,
222
224
isNeedToAddNull :
223
- this . schemaParserFabric . schemaUtils . isNullMissingInType ,
224
- inlineExtraFormatters : this . schemaParserFabric . schemaFormatters . inline ,
225
- formatters : this . schemaParserFabric . schemaFormatters . base ,
226
- formatModelName : this . typeNameFormatter . format ,
225
+ this . schemaParserFabric . schemaUtils . isNullMissingInType . bind ( this . schemaParserFabric . schemaUtils ) ,
226
+ inlineExtraFormatters : this . schemaParserFabric . schemaFormatters . inline . bind ( this . schemaParserFabric . schemaFormatters ) ,
227
+ formatters : this . schemaParserFabric . schemaFormatters . base . bind ( this . schemaParserFabric . schemaFormatters ) ,
228
+ formatModelName : this . typeNameFormatter . format . bind ( this . typeNameFormatter ) ,
227
229
fmtToJSDocLine : function fmtToJSDocLine ( line , { eol = true } ) {
228
230
return ` * ${ line } ${ eol ? "\n" : "" } ` ;
229
231
} ,
230
232
NameResolver : NameResolver ,
231
233
_,
232
- require : this . templatesWorker . requireFnFromTemplate ,
234
+ require : this . templatesWorker . requireFnFromTemplate . bind ( this . templatesWorker ) ,
233
235
} ,
234
236
config : this . config ,
235
237
} ;
0 commit comments