Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[daterangepicker] Fixed minYear/maxYear properties for DateRangePicker #62557

Merged
merged 1 commit into from Dec 8, 2022

Conversation

WiseBird
Copy link
Contributor

@WiseBird WiseBird commented Oct 4, 2022

Please fill in this template.

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an npm package, match the name. If not, do not conflict with the name of an npm package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tslint.json should contain { "extends": "@definitelytyped/dtslint/dt.json" }, and no additional rules.
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

If changing an existing definition:

If removing a declaration:

  • If a package was never on Definitely Typed, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

@typescript-bot
Copy link
Contributor

typescript-bot commented Oct 4, 2022

@WiseBird Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ❓ Continuous integration tests have gone missing
  • ✅ Most recent commit is approved by type definition owners, DT maintainers or others

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 62557,
  "author": "WiseBird",
  "headCommitOid": "8f20d3d59670d2815d3197ffab3210414fd156ad",
  "mergeBaseOid": "41d1b9237e351312a70c1bfbb251159965ce0bac",
  "lastPushDate": "2022-10-05T15:40:24.000Z",
  "lastActivityDate": "2022-12-08T19:35:39.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "daterangepicker",
      "kind": "edit",
      "files": [
        {
          "path": "types/daterangepicker/daterangepicker-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/daterangepicker/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "SirMartin",
        "smasala",
        "nertzy"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "sandersn",
      "date": "2022-12-08T19:35:39.000Z",
      "isMaintainer": true
    },
    {
      "type": "approved",
      "reviewer": "SirMartin",
      "date": "2022-10-17T07:47:23.000Z",
      "isMaintainer": false
    },
    {
      "type": "approved",
      "reviewer": "nertzy",
      "date": "2022-10-06T14:24:28.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 1267135246,
  "ciResult": "missing"
}

@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Oct 4, 2022
@typescript-bot
Copy link
Contributor

🔔 @SirMartin @smasala @nertzy — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@nertzy
Copy link
Contributor

nertzy commented Oct 4, 2022

I see that the default value for those fields is a string.

But, it also seems like they can be assigned as a number, from the following: https://github.com/dangrossman/daterangepicker/blob/8495717c4007a03fd5dee422f161811fd6140c0e/daterangepicker.js#L236-L241

Would it be better to use string | number here?

@SirMartin
Copy link
Contributor

It is a year, so probably a number is the most exactly and it is supported.

@Semigradsky
Copy link
Contributor

http://www.daterangepicker.com/#options

There are numbers in the documentation.

Copy link
Contributor

@nertzy nertzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the value for minYear and maxYear can be either a string or a number.

So we should use string | number here instead.

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Oct 5, 2022
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Oct 5, 2022
@typescript-bot
Copy link
Contributor

@WiseBird One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

@WiseBird
Copy link
Contributor Author

WiseBird commented Oct 5, 2022

@nertzy Done

@typescript-bot typescript-bot added Where is GH Actions? GH Actions didn't give a response to this PR and removed Revision needed This PR needs code changes before it can be merged. labels Oct 5, 2022
@typescript-bot typescript-bot moved this from Needs Author Action to Other in New Pull Request Status Board Oct 5, 2022
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Oct 6, 2022
@WiseBird
Copy link
Contributor Author

WiseBird commented Dec 8, 2022

@nertzy I am sorry, who should merge the PR?

@nertzy
Copy link
Contributor

nertzy commented Dec 8, 2022

I think it would usually get automatically merged once approved. I'm not sure who to ping to have this looked at...

@sandersn sandersn merged commit b159ecd into DefinitelyTyped:master Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintainer Approved Owner Approved A listed owner of this package signed off on the pull request. Where is GH Actions? GH Actions didn't give a response to this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants