mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-25 22:01:51 -05:00
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user