parent
83ae8afef8
commit
af20adb137
|
@ -0,0 +1,13 @@
|
||||||
|
tests/cases/compiler/checkTypePredicateForRedundantProperties.ts(1,35): error TS2300: Duplicate identifier 'a'.
|
||||||
|
tests/cases/compiler/checkTypePredicateForRedundantProperties.ts(1,46): error TS2300: Duplicate identifier 'a'.
|
||||||
|
|
||||||
|
|
||||||
|
==== tests/cases/compiler/checkTypePredicateForRedundantProperties.ts (2 errors) ====
|
||||||
|
function addProp2(x: any): x is { a: string; a: string; } {
|
||||||
|
~
|
||||||
|
!!! error TS2300: Duplicate identifier 'a'.
|
||||||
|
~
|
||||||
|
!!! error TS2300: Duplicate identifier 'a'.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
//// [checkTypePredicateForRedundantProperties.ts]
|
||||||
|
function addProp2(x: any): x is { a: string; a: string; } {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//// [checkTypePredicateForRedundantProperties.js]
|
||||||
|
function addProp2(x) {
|
||||||
|
return true;
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
function addProp2(x: any): x is { a: string; a: string; } {
|
||||||
|
return true;
|
||||||
|
}
|
Loading…
Reference in a new issue