You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the comment parser breaks if the controller file has a number with javascript literal number separator (underscore), like 1_000_000 for one million, instead of 1000000. This feature is part of Javascript as of ES2021: https://v8.dev/features/numeric-separators
affected controller example:
exportdefaultclassImagemController{privatereadonlypageSize=10_000// <------ the JSDoc only works if the underscore is removed/** * @findByKM * @paramQuery id - id do km - @type(number) @required * @paramQuery type - tipo da foto - @type(string) */asyncfindByKM({ request }: HttpContext){constpage=1constperPage=this.pageSizeconstresult=awaitImagem.query().where('id_km_trecho_gasoduto',request.qs().id).if(request.qs().type==='',(query)=>query.whereNull('tipo_foto'),(query)=>query.where('tipo_foto',request.qs()['type'])).paginate(page,perPage)returnresult.serialize()}
this seems to be a limitation in the Esprima library.
you can debug the problem by putting a breakpoint in this block inside the tokenize() function in esprima.js
catch(e){tokenizer.errorHandler.tolerate(e);}
The text was updated successfully, but these errors were encountered:
the comment parser breaks if the controller file has a number with javascript literal number separator (underscore), like
1_000_000
for one million, instead of1000000
. This feature is part of Javascript as of ES2021: https://v8.dev/features/numeric-separatorsaffected controller example:
this seems to be a limitation in the Esprima library.
you can debug the problem by putting a breakpoint in this block inside the tokenize() function in
esprima.js
The text was updated successfully, but these errors were encountered: