Skip to content

Commit 8d99ad0

Browse files
atscottpkozlowski-opensource
authored andcommitted
Revert "feat(compiler): add support for compile-time required inputs (#49453)" (#49467)
This reverts commit 13dd614. This breaks a g3 Typescript compilation tests where diagnostics are expected for a missing input in the component. PR Close #49467
1 parent c934a8e commit 8d99ad0

File tree

45 files changed

+213
-1098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+213
-1098
lines changed

goldens/public-api/common/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ export class NgClass implements DoCheck {
485485
// (undocumented)
486486
ngDoCheck(): void;
487487
// (undocumented)
488-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgClass, "[ngClass]", never, { "klass": { "alias": "class"; "required": false; }; "ngClass": { "alias": "ngClass"; "required": false; }; }, {}, never, never, true, never>;
488+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgClass, "[ngClass]", never, { "klass": "class"; "ngClass": "ngClass"; }, {}, never, never, true, never>;
489489
// (undocumented)
490490
static ɵfac: i0.ɵɵFactoryDeclaration<NgClass, never>;
491491
}
@@ -508,7 +508,7 @@ export class NgComponentOutlet implements OnChanges, OnDestroy {
508508
// (undocumented)
509509
ngOnDestroy(): void;
510510
// (undocumented)
511-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgComponentOutlet, "[ngComponentOutlet]", never, { "ngComponentOutlet": { "alias": "ngComponentOutlet"; "required": false; }; "ngComponentOutletInjector": { "alias": "ngComponentOutletInjector"; "required": false; }; "ngComponentOutletContent": { "alias": "ngComponentOutletContent"; "required": false; }; "ngComponentOutletNgModule": { "alias": "ngComponentOutletNgModule"; "required": false; }; "ngComponentOutletNgModuleFactory": { "alias": "ngComponentOutletNgModuleFactory"; "required": false; }; }, {}, never, never, true, never>;
511+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgComponentOutlet, "[ngComponentOutlet]", never, { "ngComponentOutlet": "ngComponentOutlet"; "ngComponentOutletInjector": "ngComponentOutletInjector"; "ngComponentOutletContent": "ngComponentOutletContent"; "ngComponentOutletNgModule": "ngComponentOutletNgModule"; "ngComponentOutletNgModuleFactory": "ngComponentOutletNgModuleFactory"; }, {}, never, never, true, never>;
512512
// (undocumented)
513513
static ɵfac: i0.ɵɵFactoryDeclaration<NgComponentOutlet, never>;
514514
}
@@ -524,7 +524,7 @@ class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
524524
get ngForTrackBy(): TrackByFunction<T>;
525525
static ngTemplateContextGuard<T, U extends NgIterable<T>>(dir: NgForOf<T, U>, ctx: any): ctx is NgForOfContext<T, U>;
526526
// (undocumented)
527-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgForOf<any, any>, "[ngFor][ngForOf]", never, { "ngForOf": { "alias": "ngForOf"; "required": false; }; "ngForTrackBy": { "alias": "ngForTrackBy"; "required": false; }; "ngForTemplate": { "alias": "ngForTemplate"; "required": false; }; }, {}, never, never, true, never>;
527+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgForOf<any, any>, "[ngFor][ngForOf]", never, { "ngForOf": "ngForOf"; "ngForTrackBy": "ngForTrackBy"; "ngForTemplate": "ngForTemplate"; }, {}, never, never, true, never>;
528528
// (undocumented)
529529
static ɵfac: i0.ɵɵFactoryDeclaration<NgForOf<any, any>, never>;
530530
}
@@ -561,7 +561,7 @@ export class NgIf<T = unknown> {
561561
static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): ctx is NgIfContext<Exclude<T, false | 0 | '' | null | undefined>>;
562562
static ngTemplateGuard_ngIf: 'binding';
563563
// (undocumented)
564-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgIf<any>, "[ngIf]", never, { "ngIf": { "alias": "ngIf"; "required": false; }; "ngIfThen": { "alias": "ngIfThen"; "required": false; }; "ngIfElse": { "alias": "ngIfElse"; "required": false; }; }, {}, never, never, true, never>;
564+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgIf<any>, "[ngIf]", never, { "ngIf": "ngIf"; "ngIfThen": "ngIfThen"; "ngIfElse": "ngIfElse"; }, {}, never, never, true, never>;
565565
// (undocumented)
566566
static ɵfac: i0.ɵɵFactoryDeclaration<NgIf<any>, never>;
567567
}
@@ -628,7 +628,7 @@ export class NgOptimizedImage implements OnInit, OnChanges, OnDestroy {
628628
// (undocumented)
629629
get width(): number | undefined;
630630
// (undocumented)
631-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgOptimizedImage, "img[ngSrc]", never, { "ngSrc": { "alias": "ngSrc"; "required": false; }; "ngSrcset": { "alias": "ngSrcset"; "required": false; }; "sizes": { "alias": "sizes"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "priority": { "alias": "priority"; "required": false; }; "loaderParams": { "alias": "loaderParams"; "required": false; }; "disableOptimizedSrcset": { "alias": "disableOptimizedSrcset"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "src": { "alias": "src"; "required": false; }; "srcset": { "alias": "srcset"; "required": false; }; }, {}, never, never, true, never>;
631+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgOptimizedImage, "img[ngSrc]", never, { "ngSrc": "ngSrc"; "ngSrcset": "ngSrcset"; "sizes": "sizes"; "width": "width"; "height": "height"; "loading": "loading"; "priority": "priority"; "loaderParams": "loaderParams"; "disableOptimizedSrcset": "disableOptimizedSrcset"; "fill": "fill"; "src": "src"; "srcset": "srcset"; }, {}, never, never, true, never>;
632632
// (undocumented)
633633
static ɵfac: i0.ɵɵFactoryDeclaration<NgOptimizedImage, never>;
634634
}
@@ -641,7 +641,7 @@ export class NgPlural {
641641
// (undocumented)
642642
set ngPlural(value: number);
643643
// (undocumented)
644-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgPlural, "[ngPlural]", never, { "ngPlural": { "alias": "ngPlural"; "required": false; }; }, {}, never, never, true, never>;
644+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgPlural, "[ngPlural]", never, { "ngPlural": "ngPlural"; }, {}, never, never, true, never>;
645645
// (undocumented)
646646
static ɵfac: i0.ɵɵFactoryDeclaration<NgPlural, never>;
647647
}
@@ -667,7 +667,7 @@ export class NgStyle implements DoCheck {
667667
[klass: string]: any;
668668
} | null | undefined);
669669
// (undocumented)
670-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgStyle, "[ngStyle]", never, { "ngStyle": { "alias": "ngStyle"; "required": false; }; }, {}, never, never, true, never>;
670+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgStyle, "[ngStyle]", never, { "ngStyle": "ngStyle"; }, {}, never, never, true, never>;
671671
// (undocumented)
672672
static ɵfac: i0.ɵɵFactoryDeclaration<NgStyle, never>;
673673
}
@@ -677,7 +677,7 @@ export class NgSwitch {
677677
// (undocumented)
678678
set ngSwitch(newValue: any);
679679
// (undocumented)
680-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitch, "[ngSwitch]", never, { "ngSwitch": { "alias": "ngSwitch"; "required": false; }; }, {}, never, never, true, never>;
680+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitch, "[ngSwitch]", never, { "ngSwitch": "ngSwitch"; }, {}, never, never, true, never>;
681681
// (undocumented)
682682
static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitch, never>;
683683
}
@@ -688,7 +688,7 @@ export class NgSwitchCase implements DoCheck {
688688
ngDoCheck(): void;
689689
ngSwitchCase: any;
690690
// (undocumented)
691-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitchCase, "[ngSwitchCase]", never, { "ngSwitchCase": { "alias": "ngSwitchCase"; "required": false; }; }, {}, never, never, true, never>;
691+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitchCase, "[ngSwitchCase]", never, { "ngSwitchCase": "ngSwitchCase"; }, {}, never, never, true, never>;
692692
// (undocumented)
693693
static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitchCase, [null, null, { optional: true; host: true; }]>;
694694
}
@@ -711,7 +711,7 @@ export class NgTemplateOutlet implements OnChanges {
711711
ngTemplateOutletContext: Object | null;
712712
ngTemplateOutletInjector: Injector | null;
713713
// (undocumented)
714-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgTemplateOutlet, "[ngTemplateOutlet]", never, { "ngTemplateOutletContext": { "alias": "ngTemplateOutletContext"; "required": false; }; "ngTemplateOutlet": { "alias": "ngTemplateOutlet"; "required": false; }; "ngTemplateOutletInjector": { "alias": "ngTemplateOutletInjector"; "required": false; }; }, {}, never, never, true, never>;
714+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgTemplateOutlet, "[ngTemplateOutlet]", never, { "ngTemplateOutletContext": "ngTemplateOutletContext"; "ngTemplateOutlet": "ngTemplateOutlet"; "ngTemplateOutletInjector": "ngTemplateOutletInjector"; }, {}, never, never, true, never>;
715715
// (undocumented)
716716
static ɵfac: i0.ɵɵFactoryDeclaration<NgTemplateOutlet, never>;
717717
}

goldens/public-api/compiler-cli/error_code.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export enum ErrorCode {
4040
HOST_DIRECTIVE_COMPONENT = 2015,
4141
HOST_DIRECTIVE_CONFLICTING_ALIAS = 2018,
4242
HOST_DIRECTIVE_INVALID = 2013,
43-
HOST_DIRECTIVE_MISSING_REQUIRED_BINDING = 2019,
4443
HOST_DIRECTIVE_NOT_STANDALONE = 2014,
4544
HOST_DIRECTIVE_UNDEFINED_BINDING = 2017,
4645
IMPORT_CYCLE_DETECTED = 3003,
@@ -54,7 +53,6 @@ export enum ErrorCode {
5453
MISSING_NGFOROF_LET = 8105,
5554
MISSING_PIPE = 8004,
5655
MISSING_REFERENCE_TARGET = 8003,
57-
MISSING_REQUIRED_INPUTS = 8008,
5856
NGMODULE_BOOTSTRAP_IS_STANDALONE = 6009,
5957
NGMODULE_DECLARATION_IS_STANDALONE = 6008,
6058
NGMODULE_DECLARATION_NOT_UNIQUE = 6007,

goldens/public-api/core/index.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,7 @@ export interface Directive {
459459
inputs?: string[];
460460
outputs?: string[];
461461
})[];
462-
inputs?: ({
463-
name: string;
464-
alias?: string;
465-
required?: boolean;
466-
} | string)[];
462+
inputs?: string[];
467463
jit?: true;
468464
outputs?: string[];
469465
providers?: Provider[];
@@ -801,18 +797,17 @@ export interface InjectorType<T> extends Type<T> {
801797

802798
// @public
803799
export interface Input {
804-
alias?: string;
805-
required?: boolean;
800+
bindingPropertyName?: string;
806801
}
807802

808803
// @public (undocumented)
809804
export const Input: InputDecorator;
810805

811806
// @public (undocumented)
812807
export interface InputDecorator {
813-
(arg?: string | Input): any;
808+
(bindingPropertyName?: string): any;
814809
// (undocumented)
815-
new (arg?: string | Input): any;
810+
new (bindingPropertyName?: string): any;
816811
}
817812

818813
// @public
@@ -1066,17 +1061,17 @@ export interface OptionalDecorator {
10661061

10671062
// @public
10681063
export interface Output {
1069-
alias?: string;
1064+
bindingPropertyName?: string;
10701065
}
10711066

10721067
// @public (undocumented)
10731068
export const Output: OutputDecorator;
10741069

10751070
// @public
10761071
export interface OutputDecorator {
1077-
(alias?: string): any;
1072+
(bindingPropertyName?: string): any;
10781073
// (undocumented)
1079-
new (alias?: string): any;
1074+
new (bindingPropertyName?: string): any;
10801075
}
10811076

10821077
// @public

0 commit comments

Comments
 (0)