askql icon indicating copy to clipboard operation
askql copied to clipboard

Simplify call(get('get'),'n') in generated AskCode

Open mhagmajer opened this issue 4 years ago • 5 comments

  1. See that call(get('get'),'n') is the same as get('n').
  2. Search for *.askcode files that have this pattern.
  3. Generalise this simplification.
  4. Document it and create a PR for it.
  5. Figure out how our test runner works for *.ask files.
  6. The area to fix is either askjsx or the askscript prettier plugin.

mhagmajer avatar Jun 20 '20 20:06 mhagmajer

@mhagmajer only call(get('get'),'n') or all patern call(get('get'),'.......') ?

image vs image

km4 avatar Jun 25 '20 20:06 km4

@km4 all, naturally :)

mhagmajer avatar Jun 25 '20 20:06 mhagmajer

@mhagmajer fine, assign this issue to me and I change all this whole get()

km4 avatar Jun 25 '20 20:06 km4

@km4 you got it 👏

mhagmajer avatar Jun 25 '20 20:06 mhagmajer

@mhagmajer should be changedconst askScript = ask(f(call(get('toUpperCase'), call(get('get'),'hello'))));in /src/askExpressMiddleware/askExpressMiddleware.spec.ts ? to ask(f(call(get('toUpperCase'), call(get('hello'))))); ?

km4 avatar Jun 25 '20 21:06 km4