| 897 | // The following tests are specifically not in the authoring subdirectory to ensure that AOT doesn't check (and throws) forbidden required reads. |
| 898 | it('should throw error if a required input is accessed too early', () => { |
| 899 | @Component({ |
| 900 | selector: 'input-comp', |
| 901 | template: 'input:{{input()}}', |
| 902 | }) |
| 903 | class InputComp { |
| 904 | input = input.required<number>({debugName: 'input'}); |
| 905 | |
| 906 | constructor() { |
| 907 | this.input(); |
| 908 | } |
| 909 | } |
| 910 | |
| 911 | @Component({ |
| 912 | template: `<input-comp [input]="value" />`, |