fix(language-service): bug of accessing a string index signature using dot notation (#34177)
PR Close #34177
This commit is contained in:

committed by
Andrew Kushnir

parent
5f0703de16
commit
72a5a8cab7
@ -180,6 +180,14 @@ describe('diagnostics', () => {
|
||||
expect(diags[0].messageText)
|
||||
.toBe(`Identifier 'badProperty' is not defined. 'Hero' does not contain such a member`);
|
||||
});
|
||||
|
||||
it('should not produce errors with dot notation if stringIndexType is js primitive type',
|
||||
() => {
|
||||
mockHost.override(TEST_TEMPLATE, `
|
||||
{{primitiveType.test}}`);
|
||||
const diags = ngLS.getDiagnostics(TEST_TEMPLATE);
|
||||
expect(diags.length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user