Skip to content

Commit

Permalink
fix(platform): import InjectionToken and ViewEncapsulation instead of…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
sis0k0 committed Mar 16, 2017
1 parent 323fdc5 commit c4dc8d4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nativescript-angular/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ import {
import {
COMPILER_OPTIONS,
PlatformRef,
OpaqueToken,
InjectionToken,
ViewEncapsulation,
createPlatformFactory
} from "@angular/core";

// Work around a TS bug requiring an import of OpaqueToken without using it
// Work around a TS bug requiring an imports of InjectionToken and ViewEncapsulation without using them
if (global.___TS_UNUSED) {
(() => {
return OpaqueToken;
})();
(() => InjectionToken)();
(() => ViewEncapsulation)();
}

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

0 comments on commit c4dc8d4

Please sign in to comment.