mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00

* refactor(console): remove the console module Removing the console module implementation eliminates some error-prone formatting logic, and certain platform-specific checks. The implementation was also android-specific. Left a stub Console class implementation as one is necessary to avoid errors with `console` being undefined during the snapshot stage for android. The console module is replaced by a 'console' implementation in the Android Runtime. See android-runtime/PR #884 * fix(tests): update console module tests
42 lines
793 B
TypeScript
42 lines
793 B
TypeScript
/**
|
|
* This is a stub class, the console is implemented in native code
|
|
*/
|
|
export class Console {
|
|
|
|
public time(reportName?: string): void {
|
|
// console.time stub
|
|
}
|
|
|
|
public timeEnd(reportName?: string): void {
|
|
// console.timeEnd stub
|
|
}
|
|
|
|
public assert(test: boolean, message?: string): void {
|
|
// console.assert stub
|
|
}
|
|
|
|
public info(message: any): void {
|
|
// console.info stub
|
|
}
|
|
|
|
public warn(message: any): void {
|
|
// console.warn stub
|
|
}
|
|
|
|
public error(message: any): void {
|
|
// console.error stub
|
|
}
|
|
|
|
public log(message: any): void {
|
|
// console.log stub
|
|
}
|
|
|
|
public trace(): void {
|
|
// console.trace stub
|
|
}
|
|
|
|
public dir(obj: any): void {
|
|
// console.dir stub
|
|
}
|
|
}
|