[BUG] Issue with typescript typings of Model.scan
See original GitHub issueI 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:
- Created 3 years ago
- Reactions:4
- Comments:12 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
Thanks @fishcharlie & @hardyscc !! Appreciate your work and time on this project 😃