Skip to content

Commit 6fa9b58

Browse files
committed
refactor: rewrite private import using the ɵ prefix
1 parent 9e8b4eb commit 6fa9b58

6 files changed

+14
-67
lines changed

Diff for: nativescript-angular/animation-driver.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { AnimationPlayer } from "@angular/core";
2-
import { AnimationStyles, AnimationKeyframe } from "./private_import_core";
1+
import { AnimationPlayer, ɵAnimationStyles, ɵAnimationKeyframe } from "@angular/core";
32
import { NativeScriptAnimationPlayer } from "./animation-player";
43
import { View } from "ui/core/view";
54
import { getPropertyByCssName } from "ui/styling/style-property";
65

76
export abstract class AnimationDriver {
87
abstract animate(
9-
element: any, startingStyles: AnimationStyles, keyframes: AnimationKeyframe[],
8+
element: any, startingStyles: ɵAnimationStyles, keyframes: ɵAnimationKeyframe[],
109
duration: number, delay: number, easing: string): AnimationPlayer;
1110
}
1211

@@ -18,8 +17,8 @@ export class NativeScriptAnimationDriver implements AnimationDriver {
1817

1918
animate(
2019
element: any,
21-
_startingStyles: AnimationStyles,
22-
keyframes: AnimationKeyframe[],
20+
_startingStyles: ɵAnimationStyles,
21+
keyframes: ɵAnimationKeyframe[],
2322
duration: number,
2423
delay: number,
2524
easing: string

Diff for: nativescript-angular/animation-player.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { AnimationPlayer } from "@angular/core";
2-
import { AnimationKeyframe } from "./private_import_core";
1+
import { AnimationPlayer, ɵAnimationKeyframe } from "@angular/core";
32
import {
43
KeyframeAnimation,
54
KeyframeAnimationInfo,
@@ -25,7 +24,7 @@ export class NativeScriptAnimationPlayer implements AnimationPlayer {
2524

2625
constructor(
2726
element: Node,
28-
keyframes: AnimationKeyframe[],
27+
keyframes: ɵAnimationKeyframe[],
2928
duration: number,
3029
delay: number,
3130
easing: string

Diff for: nativescript-angular/dom-adapter.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/* tslint:disable */
22
import { Type } from "@angular/core";
3-
import { DomAdapter } from "./private_import_platform-browser";
3+
import { ɵDomAdapter } from "@angular/platform-browser";
44
import { rendererLog } from "./trace";
55
import { print } from "./lang-facade";
66

7-
export class NativeScriptDomAdapter implements DomAdapter {
7+
export class NativeScriptDomAdapter implements ɵDomAdapter {
88
static makeCurrent() {
99

1010
// Don't register when bundling (likely AoT setup).
1111
if (!global.TNS_WEBPACK) {
1212
try {
13-
const privateAPI = global.require("@angular/platform-browser").__platform_browser_private__;
14-
const setRootDomAdapter = privateAPI.setRootDomAdapter;
13+
const privateAPI = global.require("@angular/platform-browser");
14+
const setRootDomAdapter = privateAPI.ɵsetRootDomAdapter;
1515

1616
rendererLog("Setting root DOM adapter...");
1717
setRootDomAdapter(new NativeScriptDomAdapter());

Diff for: nativescript-angular/private_import_core.ts

-37
This file was deleted.

Diff for: nativescript-angular/private_import_platform-browser.ts

-14
This file was deleted.

Diff for: nativescript-angular/renderer.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
22
Inject, Injectable, Optional, NgZone,
3-
Renderer, RootRenderer, RenderComponentType, AnimationPlayer
3+
Renderer, RootRenderer, RenderComponentType, AnimationPlayer,
4+
ɵAnimationStyles, ɵAnimationKeyframe,
45
} from "@angular/core";
5-
import { AnimationStyles, AnimationKeyframe } from "./private_import_core";
66
import { APP_ROOT_VIEW, DEVICE } from "./platform-providers";
77
import { isBlank } from "./lang-facade";
88
import { View } from "ui/core/view";
@@ -244,8 +244,8 @@ export class NativeScriptRenderer extends Renderer {
244244

245245
public animate(
246246
element: any,
247-
startingStyles: AnimationStyles,
248-
keyframes: AnimationKeyframe[],
247+
startingStyles: ɵAnimationStyles,
248+
keyframes: ɵAnimationKeyframe[],
249249
duration: number,
250250
delay: number,
251251
easing: string

0 commit comments

Comments
 (0)