Skip to content

Commit 4903752

Browse files
sis0k0hdeshev
authored andcommitted
refactor: rewrite private import using the ɵ prefix
1 parent e15c7af commit 4903752

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,11 +1,10 @@
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 "tns-core-modules/ui/core/view";
54

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

@@ -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,
@@ -24,7 +23,7 @@ export class NativeScriptAnimationPlayer implements AnimationPlayer {
2423

2524
constructor(
2625
element: Node,
27-
keyframes: AnimationKeyframe[],
26+
keyframes: ɵAnimationKeyframe[],
2827
duration: number,
2928
delay: number,
3029
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 "tns-core-modules/ui/core/view";
@@ -245,8 +245,8 @@ export class NativeScriptRenderer extends Renderer {
245245

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

0 commit comments

Comments
 (0)