components icon indicating copy to clipboard operation
components copied to clipboard

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

Open BHUVANSH855 opened this issue 6 months ago • 1 comments

PR Checklist

  • [x] 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?

  • [x] Bugfix
  • [ ] Feature
  • [ ] Documentation Update

What is the current behavior?

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

@returns The new date, or null if invalid.

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

Issue Number: #33059

What is the new behavior?

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

BHUVANSH855 avatar May 27 '26 03:05 BHUVANSH855

Hi @andrewseguin @wagnermaciel,

Just checking regarding this PR. Any feedback.

BHUVANSH855 avatar Jun 09 '26 10:06 BHUVANSH855