@@ -39,6 +39,42 @@ describe('type definitions', () => {
3939 assertFileNames ( definitions , [ 'index.d.ts' ] ) ;
4040 } ) ;
4141
42+ describe ( 'inputs' , ( ) => {
43+ it ( 'return the definition for a signal input' , ( ) => {
44+ initMockFileSystem ( 'Native' ) ;
45+ const files = {
46+ 'app.ts' : `
47+ import {Component, Directive, input} from '@angular/core';
48+
49+ @Directive({
50+ selector: 'my-dir',
51+ standalone: true
52+ })
53+ export class MyDir {
54+ firstName = input<string>();
55+ }
56+
57+ @Component({
58+ templateUrl: 'app.html',
59+ standalone: true,
60+ imports: [MyDir],
61+ })
62+ export class AppCmp {}
63+ ` ,
64+ 'app.html' : `Will be overridden` ,
65+ } ;
66+ env = LanguageServiceTestEnv . setup ( ) ;
67+ const project = env . addProject ( 'test' , files ) ;
68+ const definitions = getTypeDefinitionsAndAssertBoundSpan (
69+ project , { templateOverride : `<my-dir [first¦Name]="undefined" />` } ) ;
70+ expect ( definitions ! . length ) . toEqual ( 1 ) ;
71+
72+ assertTextSpans ( definitions , [ 'InputSignal' ] ) ;
73+ assertFileNames ( definitions , [ 'index.d.ts' ] ) ;
74+ } ) ;
75+ } ) ;
76+
77+
4278 function getTypeDefinitionsAndAssertBoundSpan (
4379 project : Project , { templateOverride} : { templateOverride : string } ) {
4480 const text = templateOverride . replace ( '¦' , '' ) ;
0 commit comments