diff --git a/tns-core-modules/application/application.android.ts b/tns-core-modules/application/application.android.ts index 79f0cc56f..1d2f0c76b 100644 --- a/tns-core-modules/application/application.android.ts +++ b/tns-core-modules/application/application.android.ts @@ -49,6 +49,7 @@ export class AndroidApplication extends Observable implements AndroidApplication private callbacks: any = {}; public get currentContext(): android.content.Context { + console.log("application.currentContext is deprecated; use startActivity, foregroundActivity, or context instead"); return this.foregroundActivity; } @@ -131,6 +132,8 @@ let started = false; // NOTE: for backwards compatibility. Remove for 4.0.0. const createRootFrame = { value: true }; export function start(entry?: NavigationEntry | string) { + console.log("application.start() is deprecated; use application.run() instead"); + if (started) { throw new Error("Application is already started."); } diff --git a/tns-core-modules/application/application.d.ts b/tns-core-modules/application/application.d.ts index 16f45599e..d93c0872f 100644 --- a/tns-core-modules/application/application.d.ts +++ b/tns-core-modules/application/application.d.ts @@ -186,7 +186,8 @@ export function on(event: "livesync", callback: (args: EventData) => void); export function off(eventNames: string, callback?: any, thisArg?: any); /** - * Deprecated. Use application run. + * @deprecated use application.run() instead. + * * Call this method to start the application. Important: All code after this method call will not be executed! */ export function start(entry?: NavigationEntry | string); @@ -400,7 +401,7 @@ export class AndroidApplication extends Observable { foregroundActivity: any /* android.support.v7.app.AppCompatActivity */; /** - * Deprecated. Please use startActivity, foregroundActivity or context property. + * @deprecated use startActivity, foregroundActivity or context instead */ currentContext: any /* android.content.Context */; diff --git a/tns-core-modules/application/application.ios.ts b/tns-core-modules/application/application.ios.ts index 6601904a0..df635cf5f 100644 --- a/tns-core-modules/application/application.ios.ts +++ b/tns-core-modules/application/application.ios.ts @@ -301,6 +301,8 @@ export function getRootView() { const createRootFrame = { value: true }; let started: boolean = false; export function start(entry?: string | NavigationEntry) { + console.log("application.start() is deprecated; use application.run() instead"); + mainEntry = typeof entry === "string" ? { moduleName: entry } : entry; started = true; diff --git a/tns-core-modules/image-source/image-source.android.ts b/tns-core-modules/image-source/image-source.android.ts index 175495321..56140ba5e 100644 --- a/tns-core-modules/image-source/image-source.android.ts +++ b/tns-core-modules/image-source/image-source.android.ts @@ -246,6 +246,8 @@ export function fromNativeSource(source: any): ImageSource { } export function fromUrl(url: string): Promise { + console.log("imageSource.fromUrl(url) is deprecated; use http.getImage(url) instead"); + ensureHttp(); return http.getImage(url); } diff --git a/tns-core-modules/image-source/image-source.d.ts b/tns-core-modules/image-source/image-source.d.ts index 3e00213c4..dce921019 100644 --- a/tns-core-modules/image-source/image-source.d.ts +++ b/tns-core-modules/image-source/image-source.d.ts @@ -148,10 +148,11 @@ export function fromBase64(source: string): ImageSource; export function fromNativeSource(source: any): ImageSource; /** - * Deprecated. Use http.getImage(url: string) instead. -* Downloads the image from the provided Url and creates a new ImageSource instance from it. -* @param url The link to the remote image object. This operation will download and decode the image. -*/ + * @deprecated use http.getImage(url: string) instead + * + * Downloads the image from the provided Url and creates a new ImageSource instance from it. + * @param url The link to the remote image object. This operation will download and decode the image. + */ export function fromUrl(url: string): Promise; /** diff --git a/tns-core-modules/image-source/image-source.ios.ts b/tns-core-modules/image-source/image-source.ios.ts index d4771f4f7..c5228b80f 100644 --- a/tns-core-modules/image-source/image-source.ios.ts +++ b/tns-core-modules/image-source/image-source.ios.ts @@ -236,6 +236,8 @@ export function fromNativeSource(source: any): ImageSource { } export function fromUrl(url: string): Promise { + console.log("imageSource.fromUrl(url) is deprecated; use http.getImage(url) instead"); + ensureHttp(); return http.getImage(url); } diff --git a/tns-core-modules/ui/builder/builder.d.ts b/tns-core-modules/ui/builder/builder.d.ts index 9224ce326..4a2f2cc31 100644 --- a/tns-core-modules/ui/builder/builder.d.ts +++ b/tns-core-modules/ui/builder/builder.d.ts @@ -7,7 +7,8 @@ import { Page } from "../page"; import { NavigationEntry } from "../frame"; /** - * Deprecated. Use createViewFromEntry instead. + * @deprecated use createViewFromEntry instead + * * @param moduleNamePath * @param fileName * @param moduleExports diff --git a/tns-core-modules/ui/core/view-base/view-base.d.ts b/tns-core-modules/ui/core/view-base/view-base.d.ts index abda166de..cbd910d46 100644 --- a/tns-core-modules/ui/core/view-base/view-base.d.ts +++ b/tns-core-modules/ui/core/view-base/view-base.d.ts @@ -159,7 +159,8 @@ export abstract class ViewBase extends Observable { //@endprivate /** - * @deprecated Use showModal with ShowModalOptions instead. + * @deprecated use showModal with ShowModalOptions instead + * * Shows the View contained in moduleName as a modal view. * @param moduleName - The name of the module to load starting from the application root. * @param context - Any context you want to pass to the modally shown view. @@ -173,7 +174,8 @@ export abstract class ViewBase extends Observable { showModal(moduleName: string, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean): ViewBase; /** - * @deprecated Use showModal with ShowModalOptions instead. + * @deprecated use showModal with ShowModalOptions instead + * * Shows the view passed as parameter as a modal view. * @param view - View instance to be shown modally. * @param context - Any context you want to pass to the modally shown view. This same context will be available in the arguments of the shownModally event handler. @@ -199,8 +201,7 @@ export abstract class ViewBase extends Observable { showModal(view: ViewBase, modalOptions: ShowModalOptions): ViewBase; /** - * Deprecated. Showing view as modal is deprecated. - * Use showModal method with arguments. + * @deprecated use showModal method with arguments */ showModal(): ViewBase; @@ -365,9 +366,10 @@ export abstract class ViewBase extends Observable { public _goToVisualState(state: string): void; /** + * @deprecated + * * This used to be the way to set attribute values in early {N} versions. * Now attributes are expected to be set as plain properties on the view instances. - * @deprecated */ public _applyXmlAttribute(attribute, value): boolean; public setInlineStyle(style: string): void; diff --git a/tns-core-modules/ui/core/view-base/view-base.ts b/tns-core-modules/ui/core/view-base/view-base.ts index 34e8ff982..1863ce05d 100644 --- a/tns-core-modules/ui/core/view-base/view-base.ts +++ b/tns-core-modules/ui/core/view-base/view-base.ts @@ -866,9 +866,10 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition } /** + * @deprecated + * * This used to be the way to set attribute values in early {N} versions. * Now attributes are expected to be set as plain properties on the view instances. - * @deprecated */ public _applyXmlAttribute(attribute: string, value: string): boolean { if (attribute === "style" || attribute === "rows" || attribute === "columns" || attribute === "fontAttributes") { diff --git a/tns-core-modules/ui/core/view/view.d.ts b/tns-core-modules/ui/core/view/view.d.ts index 04a310522..1e4d7dcc2 100644 --- a/tns-core-modules/ui/core/view/view.d.ts +++ b/tns-core-modules/ui/core/view/view.d.ts @@ -473,7 +473,8 @@ export abstract class View extends ViewBase { public getGestureObservers(type: GestureTypes): Array; /** - * [Deprecated. Please use the on() instead.] Adds a gesture observer. + * @deprecated use on() instead + * * @param type - Type of the gesture. * @param callback - A function that will be executed when gesture is received. * @param thisArg - An optional parameter which will be used as `this` context for callback execution. diff --git a/tns-core-modules/ui/frame/frame.d.ts b/tns-core-modules/ui/frame/frame.d.ts index a92519b69..9718f39ed 100644 --- a/tns-core-modules/ui/frame/frame.d.ts +++ b/tns-core-modules/ui/frame/frame.d.ts @@ -15,7 +15,8 @@ export * from "../page"; */ export class Frame extends View { /** - * Deprecated. + * @deprecated + * * String value used when hooking to androidOptionSelected event (prefix `android` states that this event is available only in Android). */ public static androidOptionSelectedEvent: string; @@ -208,7 +209,8 @@ export function topmost(): Frame; export function goBack(); /** - * Deprecated. Use getFrameById() if you want to retrieve a frame different than the topmost one. + * @deprecated use getFrameById() if you want to retrieve a frame different than the topmost one + * * Gets the frames stack. */ export function stack(): Array; @@ -395,8 +397,9 @@ export interface AndroidFrame extends Observable { showActionBar: boolean; /** + * @deprecated this property is not used internally + * * Gets or sets whether the page UI will be cached when navigating away from the page. - * Deprecated. This property is not used internally. */ cachePagesOnNavigate: boolean; diff --git a/tns-core-modules/ui/utils.d.ts b/tns-core-modules/ui/utils.d.ts index 020ab47c0..8ddc436c0 100644 --- a/tns-core-modules/ui/utils.d.ts +++ b/tns-core-modules/ui/utils.d.ts @@ -11,7 +11,8 @@ export module ios { export function getActualHeight(uiView: any /* UIView */): number; /** - * Deprecated. + * @deprecated + * * @param rootView * @param parentBounds */