fix(ivy): template type-check errors from TS should not use NG error codes (#35146)

A bug previously caused the template type-checking diagnostics produced by
TypeScript for template expressions to use -99-prefixed error codes. These
codes are converted to "NG" errors instead of "TS" errors during diagnostic
printing. This commit fixes the issue.

PR Close #35146
This commit is contained in:
Alex Rickabaugh
2020-02-04 12:23:54 -08:00
committed by Miško Hevery
parent 1f6da8c7d5
commit c35671c0a4
4 changed files with 17 additions and 11 deletions

View File

@ -135,6 +135,8 @@ export declare class AnimationEvent {
const diags = env.driveDiagnostics();
expect(diags.length).toBe(1);
expect(diags[0].messageText).toEqual(`Type 'string' is not assignable to type 'number'.`);
// The reported error code should be in the TS error space, not a -99 "NG" code.
expect(diags[0].code).toBeGreaterThan(0);
});
it('should support inputs and outputs with names that are not JavaScript identifiers', () => {