Skip to content

fix(material/core): correct createDate JSDoc return description - #33305

Open
BHUVANSH855 wants to merge 1 commit into
angular:mainfrom
BHUVANSH855:issue/33059
Open

fix(material/core): correct createDate JSDoc return description#33305
BHUVANSH855 wants to merge 1 commit into
angular:mainfrom
BHUVANSH855:issue/33059

Conversation

@BHUVANSH855

@BHUVANSH855BHUVANSH855 commented May 27, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

  • The commit message follows our guidelines
  • Tests for the changes have been added (not needed for docs-only change)
  • Docs have been added / updated

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Documentation Update

What is the current behavior?

The JSDoc for DateAdapter#createDate states that the method may return null when invalid:

@returnsThenewdate,ornullifinvalid.

However, the method signature returns D, not D | null, and implementations throw errors instead of returning null.

Closes#33059

What is the new behavior?

Updates the JSDoc return description to correctly reflect the actual behavior of the method.

@BHUVANSH855

Copy link
Copy Markdown
ContributorAuthor

Hi @andrewseguin@wagnermaciel,

Just checking regarding this PR.
Any feedback.

@pullapprove
pullapproveBot requested a review from ok7saiJuly 16, 2026 06:27
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(date-adapter): Misleading JSDoc for createDate returns type

1 participant

@BHUVANSH855