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

feat(datepicker): use readonly arrays for inputs (#2773) #3424

Merged
merged 1 commit into from Dec 6, 2019
Merged

feat(datepicker): use readonly arrays for inputs (#2773) #3424

merged 1 commit into from Dec 6, 2019

Conversation

reduckted
Copy link
Contributor

Before submitting a pull request, please make sure you have at least performed the following:

  • read and followed the CONTRIBUTING.md guide.
  • built and tested the changes locally.
  • added/updated any applicable tests.
  • added/updated any applicable API documentation.
  • added/updated any applicable demos.

Part of #2773.

Copy link
Contributor

@peterblazejewicz peterblazejewicz left a comment

Choose a reason for hiding this comment

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

why specific type instead of readonly modifier?

@Input() months: readonly MontViewModel[] = [];

I would tend to readonly, just wondering on the choice

@reduckted
Copy link
Contributor Author

@peterblazejewicz why specific type instead of readonly modifier?

I just followed what was specified in the associated issue.

A proposal is to use ReadonlyArray<T> instead of T[]

@peterblazejewicz
Copy link
Contributor

Tha'ts ok. I've updated the origin issue with description on the TS 3.4 improvements in regards of readonly types:
#2773 (comment)

Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

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

Left some comments

src/datepicker/datepicker-navigation-select.ts Outdated Show resolved Hide resolved
src/datepicker/datepicker-navigation.ts Outdated Show resolved Hide resolved
src/datepicker/datepicker-navigation.ts Outdated Show resolved Hide resolved
src/datepicker/hebrew/ngb-calendar-hebrew.ts Outdated Show resolved Hide resolved
@codecov-io
Copy link

Codecov Report

Merging #3424 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3424   +/-   ##
=======================================
  Coverage   91.13%   91.13%           
=======================================
  Files          96       96           
  Lines        2797     2797           
  Branches      516      516           
=======================================
  Hits         2549     2549           
  Misses        190      190           
  Partials       58       58
Flag Coverage Δ
#e2e 56.16% <ø> (ø) ⬆️
#unit 87.97% <ø> (ø) ⬆️
Impacted Files Coverage Δ
src/datepicker/jalali/ngb-calendar-persian.ts 3.22% <ø> (ø) ⬆️
src/datepicker/ngb-calendar.ts 94.33% <ø> (ø) ⬆️
src/datepicker/hijri/ngb-calendar-hijri.ts 88.23% <ø> (ø) ⬆️
src/datepicker/hebrew/ngb-calendar-hebrew.ts 70.96% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4780dc1...0ddbc58. Read the comment docs.

Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@maxokorokov maxokorokov added this to the 5.2.0 milestone Dec 6, 2019
@maxokorokov maxokorokov merged commit 2c3f96a into ng-bootstrap:master Dec 6, 2019
Sign up for free to 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.

None yet

4 participants