Skip to content

Commit d44d249

Browse files
Alexander VakrilovMartoYankov
andcommitted
refactor: Apply suggestions from code review
Co-Authored-By: Martin Yankov <m.i.yankov@gmail.com>
1 parent 932c7de commit d44d249

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

DevelopmentWorkflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Development Workflow
55

66
The repository contains several packages and apps:
77
- `nativescript-core` - The core NativeScript TypeScript modules used to develop NativeScript apps. Produces `@nativescript/core` npm package
8-
- `tns-core-modules-package` - Base for generating the `tns-core-modules` package (compatibility package for projects that still improt code from `tns-core-modules`).
8+
- `tns-core-modules-package` - Base for generating the `tns-core-modules` package (compatibility package for projects that still import code from `tns-core-modules`).
99
- `tns-core-modules-widgets` - The native widgets (Java and Objective-C) used by the core NativeScript modules. Produces `tns-core-modules-widgets` npm package
1010
- `tns-platform-declarations` - TypeScript definitions for Android and iOS native APIs. Produces `tns-platform-declarations` npm package
11-
- `tests` - Unit tests app for the `@nativescript/core`. These test are executed as nativescript application on mobile device or emulator.
11+
- `tests` - Unit tests app for the `@nativescript/core` package. These test are executed as nativescript application on mobile device or emulator.
1212
- `unit-test` - Node unit tests. These test validate parts of the framework that do not require the nativescript runtime and so can be executed in node environment
1313
- `e2e` - applications and *e2e* tests
1414
- `e2e/ui-tests-app` - UI app used for manual testing and automation

nativescript-core/http/http-request/http-request.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function onRequestComplete(requestId: number, result: org.nativescript.widgets.A
120120

121121
return new Promise<any>((resolveImage, rejectImage) => {
122122
if (result.responseAsImage != null) {
123-
resolveImage(new imageSourceModule.ImageSource(result.responseAsImage));
123+
resolveImage(new imageSource.ImageSource(result.responseAsImage));
124124
}
125125
else {
126126
rejectImage(new Error("Response content may not be converted to an Image"));

nativescript-core/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ export declare const Http: {
6161
request: typeof request;
6262
};
6363
export { ImageAsset, ImageAssetOptions } from "./image-asset";
64-
export { isAndroid, isIOS, screen } from "./platform";
64+
export { ImageSource } from "./image-source";
65+
export { isAndroid, isIOS, screen as Screen, device as Device } from "./platform";
6566
export { InstrumentationMode, TimerInfo } from "./profiling";
6667
import { enable as profilingEnable, disable as profilingDisable, time, uptime, start, stop, isRunning, dumpProfiles, resetProfiles, profile, startCPUProfile, stopCPUProfile } from "./profiling";
6768
export declare const Profiling: {
@@ -97,7 +98,7 @@ export declare const Trace: {
9798
isEnabled: typeof isEnabled;
9899
};
99100
export * from "./ui";
100-
import { GC, isFontIconURI, isDataURI, isFileOrResourcePath, executeOnMainThread, mainThreadify, isMainThread, dispatchToMainThread, releaseNativeObject, mergeSort, getModuleName, openFile, openUrl, layout, ad as androidUtils, ios as iosUtils } from "./utils/utils";
101+
import { GC, isFontIconURI, isDataURI, isFileOrResourcePath, executeOnMainThread, mainThreadify, isMainThread, dispatchToMainThread, releaseNativeObject, getModuleName, openFile, openUrl, layout, ad as androidUtils, ios as iosUtils } from "./utils/utils";
101102
export declare const Utils: {
102103
GC: typeof GC;
103104
isFontIconURI: typeof isFontIconURI;
@@ -108,7 +109,6 @@ export declare const Utils: {
108109
isMainThread: typeof isMainThread;
109110
dispatchToMainThread: typeof dispatchToMainThread;
110111
releaseNativeObject: typeof releaseNativeObject;
111-
mergeSort: typeof mergeSort;
112112
getModuleName: typeof getModuleName;
113113
openFile: typeof openFile;
114114
openUrl: typeof openUrl;

nativescript-core/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const Http = { getFile, getImage, getJSON, getString: httpGetString, requ
5252
export { ImageAsset, ImageAssetOptions } from "./image-asset";
5353

5454
export { ImageSource } from "./image-source";
55-
export { isAndroid, isIOS, screen } from "./platform";
55+
export { isAndroid, isIOS, screen as Screen, device as Device } from "./platform";
5656

5757
// Export interfaces from "profiling" module
5858
export { InstrumentationMode, TimerInfo } from "./profiling";
@@ -95,7 +95,7 @@ export * from "./ui"; // Barrel export
9595
import {
9696
GC, isFontIconURI, isDataURI, isFileOrResourcePath,
9797
executeOnMainThread, mainThreadify, isMainThread, dispatchToMainThread, releaseNativeObject,
98-
mergeSort, getModuleName,
98+
getModuleName,
9999
openFile, openUrl,
100100
layout, ad as androidUtils, ios as iosUtils
101101
} from "./utils/utils";
@@ -104,10 +104,10 @@ export const Utils = {
104104
GC, isFontIconURI, isDataURI, isFileOrResourcePath,
105105
executeOnMainThread, mainThreadify, isMainThread, dispatchToMainThread, releaseNativeObject,
106106

107-
mergeSort, getModuleName,
107+
getModuleName,
108108
openFile, openUrl,
109109

110110
layout, android: androidUtils, ios: iosUtils
111111
};
112112

113-
export { XmlParser, ParserEventType, ParserEvent } from "./xml";
113+
export { XmlParser, ParserEventType, ParserEvent } from "./xml";

0 commit comments

Comments
 (0)