question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Issue with typescript typings of Model.scan

See original GitHub issue

I was following the documentation to run a scan along with a condition. It’s resulting into a typescript compilation error

Property 'exec' does not exist on type 'Condition'.

this is the code snippet I’m using

public async fetchByUserName(username: string) {
        return await this.model.scan('username').contains(username).exec();
    }

tsconfig.json

{
    "compilerOptions": {
      "module": "commonjs",
      "esModuleInterop": true,
      "target": "es6",
      "moduleResolution": "node",
      "sourceMap": true,
      "outDir": "./dist",
      "rootDir" : "./src",
      "strict": true
    },
    "lib": ["es2015"],
    "include": ["src/*/*.ts"]
  }

Environment:

Operating System: macOS Catalina Operating System Version: 10.15.4 Node.js version (node -v): 10.16.0 NPM version: (npm -v): 6.9.0 Dynamoose version: 2.2.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fishcharliecommented, Nov 30, 2020

@KyleMit Correct. This was just released as part of the v2.4.0 release about a week ago.

The fix from @hardyscc above was temporary until I merged the PR and released a new version (both of which have been done).

Let me know if there are any additional problems.

0reactions
KyleMitcommented, Nov 30, 2020

Thanks @fishcharlie & @hardyscc !! Appreciate your work and time on this project 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quantifying Detectable Bugs in JavaScript - Earl Barr
This partial annotation procedure is grounded on gradual typing, which both Flow and TypeScript employ. These two type systems are permissive. When they...
Read more >
Quantifying Detectable Bugs in JavaScript - Microsoft
Depending on the error model of a static type system, a might ... grounded on gradual typing, which both Flow and TypeScript employ....
Read more >
TSConfig Reference - Docs on every TSConfig option
An error occurs if any of the files can't be found. {. " compilerOptions ": {},. " files ": [. "core.ts",. "sys.ts",. "types.ts",....
Read more >
I think something really needs to be done about TypeScript ...
I think something really needs to be done about TypeScript error messages. About 95% of what is displayed is not important to solving...
Read more >
Finding dead code (and dead types) in TypeScript
(In VS Code, unused symbols typically appear in a lighter color instead of getting the red squiggly underline error treatment. This is because ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found