mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix TypeScript 2.4 errors, introduced mainly due weak types and covariant checking for callbacks (#4476)
This commit is contained in:
committed by
Alexander Vakrilov
parent
9e6498c29a
commit
8adb2fdfef
@@ -214,7 +214,7 @@ export function assertNotEqual(actual: any, expected: any, message?: string) {
|
||||
}
|
||||
}
|
||||
|
||||
export function assertEqual<T extends { equals?(arg: T): boolean }>(actual: T, expected: T, message: string = '') {
|
||||
export function assertEqual<T extends { equals?(arg: T): boolean } | any>(actual: T, expected: T, message: string = '') {
|
||||
if (!types.isNullOrUndefined(actual)
|
||||
&& !types.isNullOrUndefined(expected)
|
||||
&& types.getClass(actual) === types.getClass(expected)
|
||||
|
||||
Reference in New Issue
Block a user