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(cdk): add TuiRepeatTimes pipe #9262

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Conversation

splincode
Copy link
Member

@splincode splincode commented Sep 29, 2024

@waterplea I want to use @for in Angular 18 and I don't want use *tuiRepeatTimes

I can happy with it

image
  • strict types
image

Copy link

lumberjack-bot bot commented Sep 29, 2024

Pull request was closed ✔️

All saved screenshots (for current PR) were deleted 🗑️

Copy link
Contributor

github-actions bot commented Sep 29, 2024

Visit the preview URL for this PR (updated for commit 98b627f):

https://taiga-previews--pr9262-splincode-feat-repea-s39bz7vq.web.app

(expires Tue, 01 Oct 2024 08:15:46 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 20bbff1ad19772ecf9c5134a84c0641b0d776f4a

Copy link

bundlemon bot commented Sep 29, 2024

BundleMon

Files updated (2)
Status Path Size Limits
demo/browser/main.(hash).js
288.09KB (+116B +0.04%) +10%
demo/browser/runtime.(hash).js
42.8KB (+86B +0.2%) +10%
Unchanged files (3)
Status Path Size Limits
demo/browser/vendor.(hash).js
247.14KB +10%
demo/browser/styles.(hash).css
16.17KB +10%
demo/browser/polyfills.(hash).js
11.18KB +10%

Total files change +202B +0.03%

Groups updated (1)
Status Path Size Limits
demo/browser/*..js
7.18MB (+41.79KB +0.57%) -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link
Collaborator

@waterplea waterplea left a comment

Choose a reason for hiding this comment

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

Cool idea. Do we really need those excessive types, though?

@splincode
Copy link
Member Author

need those excessive types,

It helps with some clamp case

// @ts-expect-error
expect(pipe.transform(-1)).toEqual([]);

https://catchts.com/range-numbers

@splincode
Copy link
Member Author

splincode commented Sep 29, 2024

In the future TypeScript will add a range type to standard library, I think
microsoft/TypeScript#54925

projects/cdk/pipes/repeat-times/index.ts Outdated Show resolved Hide resolved
projects/cdk/types/range.ts Outdated Show resolved Hide resolved
@waterplea
Copy link
Collaborator

need those excessive types,

It helps with some clamp case

// @ts-expect-error
expect(pipe.transform(-1)).toEqual([]);

https://catchts.com/range-numbers

But it's a pipe, are there any benefits for it though? Seems like it's a lot of added complexity for little to no benefit.

@splincode
Copy link
Member Author

But it's a pipe, are there any benefits for it though? Seems like it's a lot of added complexity for little to no benefit.

image image

@splincode
Copy link
Member Author

@waterplea
Okey, I will drop types

@splincode splincode merged commit 712c5b3 into main Sep 30, 2024
37 of 43 checks passed
@splincode splincode deleted the splincode/feat-repeat-pipe branch September 30, 2024 08:32
This was referenced Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants