Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

dynamoose.local without params cause compilation file in TypeScript #599

Closed
9 of 16 tasks
c3s4 opened this issue Mar 18, 2019 · 0 comments · Fixed by #601
Closed
9 of 16 tasks

dynamoose.local without params cause compilation file in TypeScript #599

c3s4 opened this issue Mar 18, 2019 · 0 comments · Fixed by #601

Comments

@c3s4
Copy link

c3s4 commented Mar 18, 2019

Summary:

In documentation you say that the url parameter of local method is defaulted to http://localhost:8000, but in TypeScript leave that field empty causes a compilation error because the url parameter is not marked as optional.

Code sample:

dynamoose.local();
// this causes:
//
// Expected 1 ar guments, but got 0.ts(2554)
// dynamoose.d.ts(7, 25): An argument for 'url' was not provided.

dynamoose.local("http://localhost:8000");
// this is ok

Current output and behavior:

Compilation fail

Expected output and behavior:

Use the default value

Environment:

Operating System: MacOS
Operating System Version: 10.14.1 (18B75)
Node.js version (node -v): v8.10.0
NPM version: (npm -v): 5.6.0
Dynamoose version: 1.7.1
Dynamoose Plugins: --

Dynamoose Plugins:

  • Yes, I believe that one or multiple 3rd party Dynamoose plugins are effecting this issue
  • No, I believe this issue is independent of any 3rd party Dynamoose plugins I'm using
  • Unknown, I'm unsure if Dynamoose plugins are effecting this issue
  • I am not using any Dynamoose plugins

Type (select 1):

  • Bug report
  • Feature suggestion
  • Question
  • Other suggestion
  • Something not listed here

Other:

  • I have read through the Dynamoose documentation before posting this issue
  • I have searched through the GitHub issues (including closed issues) and pull requests to ensure this issue has not already been raised before
  • I have searched the internet and Stack Overflow to ensure this issue hasn't been raised or answered before
  • I have tested the code provided and am confident it doesn't work as intended
  • I have ensured that all of my plugins that I'm using with Dynamoose are listed above
  • I have filled out all fields above
  • I am running the latest version of Dynamoose
@c3s4 c3s4 changed the title dyanomes.local without params cause compilation file in TypeScript dynamoose.local without params cause compilation file in TypeScript Mar 18, 2019
hweeks pushed a commit to hweeks/dynamoose that referenced this issue Mar 18, 2019
fishcharlie pushed a commit that referenced this issue Mar 18, 2019
## [1.7.2](v1.7.1...v1.7.2) (2019-03-18)

### Bug Fixes

* **types:** minor updates to typings ([63bb60d](63bb60d)), closes [#599](#599) [#600](#600)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant