mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
chore: add deprecation console warnings (#7098)
This commit is contained in:
@ -259,7 +259,14 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
|
|||||||
if (args.length === 2) {
|
if (args.length === 2) {
|
||||||
options = <ShowModalOptions>args[1];
|
options = <ShowModalOptions>args[1];
|
||||||
} else {
|
} else {
|
||||||
// TODO: Add deprecation warning
|
if (args[0] instanceof ViewCommon) {
|
||||||
|
console.log("showModal(view: ViewBase, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean) " +
|
||||||
|
"is deprecated. Use showModal(view: ViewBase, modalOptions: ShowModalOptions) instead.");
|
||||||
|
} else {
|
||||||
|
console.log("showModal(moduleName: string, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean) " +
|
||||||
|
"is deprecated. Use showModal(moduleName: string, modalOptions: ShowModalOptions) instead.");
|
||||||
|
}
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
context: args[1],
|
context: args[1],
|
||||||
closeCallback: args[2],
|
closeCallback: args[2],
|
||||||
|
@ -952,6 +952,8 @@ class ActivityCallbacksImplementation implements AndroidActivityCallbacks {
|
|||||||
const intent: android.content.Intent = superFunc ? <android.content.Intent>intentOrSuperFunc : undefined;
|
const intent: android.content.Intent = superFunc ? <android.content.Intent>intentOrSuperFunc : undefined;
|
||||||
|
|
||||||
if (!superFunc) {
|
if (!superFunc) {
|
||||||
|
console.log("AndroidActivityCallbacks.onCreate(activity: any, savedInstanceState: any, superFunc: Function) " +
|
||||||
|
"is deprecated. Use AndroidActivityCallbacks.onCreate(activity: any, savedInstanceState: any, intent: any, superFunc: Function) instead.");
|
||||||
superFunc = <Function>intentOrSuperFunc;
|
superFunc = <Function>intentOrSuperFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user