build: replace @types/trusted-types dep with minimal type defs (#39211)

The @types/trusted-types type definitions are currently imported in
types.d.ts, which causes them to eventually be imported in core.d.ts.
This forces anyone compiling against @angular/core to provide the
@types/trusted-types package in their compilation unit, which we don't
want.

To address this, get rid of the @types/trusted-types and instead import
a minimal version of the Trusted Types type definitions directly into
Angular's codebase.

Update the existing references to Trusted Types to point to the new
definitions.

PR Close #39211
This commit is contained in:
Bjarki
2020-10-13 20:48:20 +00:00
committed by atscott
parent 497af77d7a
commit 9bfb508b87
6 changed files with 51 additions and 8 deletions

1
packages/types.d.ts vendored
View File

@ -9,7 +9,6 @@
// This file contains all ambient imports needed to compile the packages/ source code
/// <reference types="hammerjs" />
/// <reference types="trusted-types" />
/// <reference lib="es2015" />
/// <reference path="./goog.d.ts" />
/// <reference path="./system.d.ts" />