-
Notifications
You must be signed in to change notification settings - Fork 26.3k
docs(docs-infra): update default generic values and add constraints for type parameters in functions #58548
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b99434b
to
3daf209
Compare
…or type parameters in functions Before ```typescript createNodeRequestHandler( handler: T ): T; ``` ```typescript class NgIf<T> { @input() set ngIf(value: T); @input() set ngIfThen(value: TemplateRef<NgIfContext<T>> | null); @input() set ngIfElse(value: TemplateRef<NgIfContext<T>> | null); static ngTemplateGuard_ngIf: "binding"; static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): boolean; } ``` Now ```typescript createNodeRequestHandler<T extends NodeRequestHandlerFunction>( handler: T ): T; ``` ```typescript class NgIf<T = unknown> { @input() set ngIf(value: T); @input() set ngIfThen(value: TemplateRef<NgIfContext<T>> | null); @input() set ngIfElse(value: TemplateRef<NgIfContext<T>> | null); static ngTemplateGuard_ngIf: "binding"; static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): boolean; } ```
3daf209
to
ff938c0
Compare
**Before:** ```ts type HttpEvent = | HttpSentEvent | HttpHeaderResponse | HttpResponse<T> | HttpProgressEvent | HttpUserEvent<T> ``` **After:** ```ts type HttpEvent<T> = | HttpSentEvent | HttpHeaderResponse | HttpResponse<T> | HttpProgressEvent | HttpUserEvent<T> ```
ff938c0
to
bb7da6a
Compare
devversion
approved these changes
Nov 8, 2024
thePunderWoman
pushed a commit
that referenced
this pull request
Nov 8, 2024
…or type parameters in functions (#58548) Before ```typescript createNodeRequestHandler( handler: T ): T; ``` ```typescript class NgIf<T> { @input() set ngIf(value: T); @input() set ngIfThen(value: TemplateRef<NgIfContext<T>> | null); @input() set ngIfElse(value: TemplateRef<NgIfContext<T>> | null); static ngTemplateGuard_ngIf: "binding"; static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): boolean; } ``` Now ```typescript createNodeRequestHandler<T extends NodeRequestHandlerFunction>( handler: T ): T; ``` ```typescript class NgIf<T = unknown> { @input() set ngIf(value: T); @input() set ngIfThen(value: TemplateRef<NgIfContext<T>> | null); @input() set ngIfElse(value: TemplateRef<NgIfContext<T>> | null); static ngTemplateGuard_ngIf: "binding"; static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): boolean; } ``` PR Close #58548
This PR was merged into the repository by commit d271c44. The changes were merged into the following branches: main, 18.2.x, 19.0.x |
thePunderWoman
pushed a commit
that referenced
this pull request
Nov 8, 2024
…or type parameters in functions (#58548) Before ```typescript createNodeRequestHandler( handler: T ): T; ``` ```typescript class NgIf<T> { @input() set ngIf(value: T); @input() set ngIfThen(value: TemplateRef<NgIfContext<T>> | null); @input() set ngIfElse(value: TemplateRef<NgIfContext<T>> | null); static ngTemplateGuard_ngIf: "binding"; static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): boolean; } ``` Now ```typescript createNodeRequestHandler<T extends NodeRequestHandlerFunction>( handler: T ): T; ``` ```typescript class NgIf<T = unknown> { @input() set ngIf(value: T); @input() set ngIfThen(value: TemplateRef<NgIfContext<T>> | null); @input() set ngIfElse(value: TemplateRef<NgIfContext<T>> | null); static ngTemplateGuard_ngIf: "binding"; static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): boolean; } ``` PR Close #58548
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
action: merge
The PR is ready for merge by the caretaker
area: docs
Related to the documentation
area: docs-infra
Angular.dev application and infrastructure
target: patch
This PR is targeted for the next patch release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before
Now