mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +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) {
|
||||
options = <ShowModalOptions>args[1];
|
||||
} 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 = {
|
||||
context: args[1],
|
||||
closeCallback: args[2],
|
||||
|
@ -952,6 +952,8 @@ class ActivityCallbacksImplementation implements AndroidActivityCallbacks {
|
||||
const intent: android.content.Intent = superFunc ? <android.content.Intent>intentOrSuperFunc : undefined;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user