Skip to content

Commit c4dc8d4

Browse files
committed
fix(platform): import InjectionToken and ViewEncapsulation instead of OpaqueToken
COMPILER_OPTIONS is no longer of type OpaqueToken. It is now an InjectionToken parameterized with object with property of type ViewEncapsulation. Introduced by: https://github.com/mhevery/angular/blame/e8778e59231f1a0f37f0ea847a6256398386fa41/tools/public_api_guard/core/index.d.ts#L224-L229
1 parent 323fdc5 commit c4dc8d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: nativescript-angular/platform.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ import {
1616
import {
1717
COMPILER_OPTIONS,
1818
PlatformRef,
19-
OpaqueToken,
19+
InjectionToken,
20+
ViewEncapsulation,
2021
createPlatformFactory
2122
} from "@angular/core";
2223

23-
// Work around a TS bug requiring an import of OpaqueToken without using it
24+
// Work around a TS bug requiring an imports of InjectionToken and ViewEncapsulation without using them
2425
if (global.___TS_UNUSED) {
25-
(() => {
26-
return OpaqueToken;
27-
})();
26+
(() => InjectionToken)();
27+
(() => ViewEncapsulation)();
2828
}
2929

3030
// Register DOM adapter, if possible. Dynamic platform only!

0 commit comments

Comments
 (0)