Alan Agius
|
9199dd9a87
|
docs(docs-infra): update default generic values and add constraints for 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
|
2024-11-08 17:15:07 +00:00 |
|