title: deno error: TS2345 [ERROR]: Argument of type
body: <p>I am having issue with this error Ts2345 while using docker run. any suggestions please?</p>
  <p>error: TS2345 [ERROR]: Argument of type '{ depth: number; sorted: boolean; trailingComma: boolean; compact: boolean; iterableLimit: number; }' is not assignable to parameter of type
  'InspectOptions'.
  Object literal may only specify known properties, and 'sorted' does not exist in type 'InspectOptions'.
  sorted: true,
  ~~~~~~~~~~~~
  at <a href="https://deno.land/std@0.61.0/testing/asserts.ts:26:9" rel="nofollow noreferrer">https://deno.land/std@0.61.0/testing/asserts.ts:26:9</a></p>
  <p>My test.ts</p>
  <pre><code>import {filterHabitablePlanets} from &quot;./planets.ts&quot;;
  
  const HABITABLE_PLANET ={
      koi_disposition: &quot;CONFIRMED&quot;, 
      koi_prad: &quot;1&quot;,
      koi_srad: &quot;1&quot;,
      koi_smass: &quot;1&quot;,
  };
  
  const NOT_CONFIRMED ={
      koi_disposition: &quot;FALSE POSITIVE&quot;, 
    
  };
  
  const TOO_LARGE_PLANETARY_RADIUS ={
      koi_disposition: &quot;CONFIRMED&quot;, 
      koi_prad: &quot;1.5&quot;,
      koi_srad: &quot;1&quot;,
      koi_smass: &quot;1&quot;,
  };
  
  const TOO_LARGE_SOLAR_RADIUS ={
      koi_disposition: &quot;CONFIRMED&quot;, 
      koi_prad: &quot;1&quot;,
      koi_srad: &quot;1.01&quot;,
      koi_smass: &quot;1&quot;,
  };
  
  const TOO_LARGE_SOLAR_MASS ={
      koi_disposition: &quot;CONFIRMED&quot;, 
      koi_prad: &quot;1&quot;,
      koi_srad: &quot;1&quot;,
      koi_smass: &quot;1.04&quot;,
  };
  
  
  
  
  Deno.test(&quot;filter only habitable planets&quot;, () =&gt;{
     const filtered = filterHabitablePlanets ([
          HABITABLE_PLANET,
          NOT_CONFIRMED,
          TOO_LARGE_PLANETARY_RADIUS,
          TOO_LARGE_SOLAR_RADIUS,
          TOO_LARGE_SOLAR_MASS,
      ]);
  
      assertEquals ( filtered, [
          HABITABLE_PLANET,
      ]);
  });
  
  </code></pre>
  <p>api.ts file</p>
  <pre><code>
  import { Router } from &quot;../src/deps.ts&quot;;
  
  import * as planets from &quot;../models/planets.ts&quot;;
  import * as launches from &quot;../models/launches.ts&quot;;
  
  const router = new Router();
  
  router.get(&quot;/&quot;, (ctx) =&gt; {
    ctx.response.body = &quot;Response-server&quot;;
  });
  
  router.get(&quot;/planets&quot;, (ctx) =&gt; {
    ctx.response.body = planets.getAll();
  });
  
  router.get(&quot;/launches&quot;, (ctx) =&gt; {
    ctx.response.body = launches.getAll();
  });
  
  router.get(&quot;/launches/:id&quot;, (ctx) =&gt; {
    if (ctx.params?.id) {
      const launchData = launches.getOne(Number(ctx.params.id));
      if (launchData) {
        ctx.response.body = launchData;
      } else {
        ctx.throw(400, &quot;Launch with that ID doesn't exist&quot;);
      }
    }
  });
  
  router.delete(&quot;/launches/:id&quot;, (ctx) =&gt; {
    if (ctx.params?.id) {
      const result = launches.removeOne(Number(ctx.params.id));
      ctx.response.body = { success: result };
    }
  });
  
  router.post(&quot;/launches&quot;, async (ctx) =&gt; {
    const body = await ctx.request.body();
  
    launches.addOne(body.value);
  
    ctx.response.body = { success: true };
    ctx.response.status = 201;
  });
  
  export default router;
  
  </code></pre>
  <p>mod.ts file</p>
  <pre><code>
  import api from &quot;../src/api.ts&quot;;
  import { log, Application, send } from &quot;../src/deps.ts&quot;;
  
  const app = new Application();
  const PORT = 3000;
  
  await log.setup({
      handlers: {
        console: new log.handlers.ConsoleHandler(&quot;INFO&quot;),
      },
      loggers: {
        default: {
          level: &quot;INFO&quot;,
          handlers: [&quot;console&quot;],
        },
      },
    });
    
  
  app.addEventListener(&quot;error&quot;, (event) =&gt; {
      log.error(event.error);
  });
  
  
  // error handling
  
  app.use(async(ctx, next) =&gt;{
      try{
          await next();
      } catch(err){
      
          ctx.response.body=&quot;Internal server error&quot;;
          throw err;
      }
      
  });
  
  app.use(async(ctx, next) =&gt; {
      await next();
      const time = ctx.response.headers.get(&quot;X-Response-Time&quot;)
      log.info(`${ctx.request.method} ${ctx.request.url}: ${time}`);
  });
  
  
  app.use(async(ctx, next) =&gt; {
      const start = Date.now();
      await next();
      const delta = Date.now() - start;
      ctx.response.headers.set(&quot;X-Response-Time&quot;, `${delta}ms`);
  });
  
  app.use(api.routes());
  app.use(api.allowedMethods());
  
  app.use(async(ctx) =&gt; {
      const filePath = ctx.request.url.pathname;
      const fileWhitelist = [ 
          &quot;/index.html&quot;,
          &quot;/javascripts/script.js&quot;,
          &quot;/stylesheets/style.css&quot;,
          &quot;/images/flavicon.png&quot;,
          &quot;/videos/space.mp4&quot;,
      ];
  // important for security reasons
      if (fileWhitelist.includes(filePath)){
          await send(ctx, filePath, {
              root: `${Deno.cwd()}/public`, 
          });
      }
      
  });
  
  
      
  if (import.meta.main){
      log.info(`Starting server on port ${PORT}...`);
      await app.listen({
          port: PORT
      });  
  }
  
  </code></pre>