feat(language-service): completions support for tuple array (#33928)

PR Close #33928
This commit is contained in:
ivanwonder
2019-11-20 07:23:45 +00:00
committed by Miško Hevery
parent de7713d6ea
commit 5a227d8d7c
6 changed files with 33 additions and 5 deletions

View File

@ -150,6 +150,15 @@ describe('diagnostics', () => {
});
});
it('should produce diagnostics for invalid tuple type property access', () => {
mockHost.override(TEST_TEMPLATE, `
{{tupleArray[1].badProperty}}`);
const diags = ngLS.getDiagnostics(TEST_TEMPLATE);
expect(diags.length).toBe(1);
expect(diags[0].messageText)
.toBe(`Identifier 'badProperty' is not defined. 'Hero' does not contain such a member`);
});
it('should not produce errors on function.bind()', () => {
mockHost.override(TEST_TEMPLATE, `
<test-comp (test)="myClick.bind(this)">