diff --git a/packages/language-service/test/diagnostics_spec.ts b/packages/language-service/test/diagnostics_spec.ts index ea24084416..4acdd08551 100644 --- a/packages/language-service/test/diagnostics_spec.ts +++ b/packages/language-service/test/diagnostics_spec.ts @@ -646,6 +646,14 @@ describe('diagnostics', () => { expect(ngDiags).toEqual([]); }); + // Issue https://github.com/angular/angular/issues/34874 + it('should recognize inputs and outputs listed inside directive decorators', () => { + mockHost.override( + TEST_TEMPLATE, `
`); + const ngDiags = ngLS.getSemanticDiagnostics(TEST_TEMPLATE); + expect(ngDiags).toEqual([]); + }); + it('should be able to resolve modules using baseUrl', () => { mockHost.override(APP_COMPONENT, ` import { Component } from '@angular/core'; diff --git a/packages/language-service/test/project/app/main.ts b/packages/language-service/test/project/app/main.ts index defe0c4372..31dab5c379 100644 --- a/packages/language-service/test/project/app/main.ts +++ b/packages/language-service/test/project/app/main.ts @@ -34,6 +34,7 @@ import * as ParsingCases from './parsing-cases'; ParsingCases.CaseMissingClosing, ParsingCases.CaseUnknown, ParsingCases.EmptyInterpolation, + ParsingCases.HintModel, ParsingCases.NoValueAttribute, ParsingCases.NumberModel, ParsingCases.Pipes, diff --git a/packages/language-service/test/project/app/parsing-cases.ts b/packages/language-service/test/project/app/parsing-cases.ts index 4ed8c4c787..77e6753add 100644 --- a/packages/language-service/test/project/app/parsing-cases.ts +++ b/packages/language-service/test/project/app/parsing-cases.ts @@ -60,6 +60,16 @@ export class NumberModel { @Output('outputAlias') modelChange: EventEmitter = new EventEmitter(); } +@Directive({ + selector: '[hint-model]', + inputs: ['hint'], + outputs: ['hintChange'], +}) +export class HintModel { + hint: string = 'hint'; + hintChange: EventEmitter = new EventEmitter(); +} + interface Person { name: string; age: number;