1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
tests/cases/compiler/augmentedTypesFunction.ts(2,10): error TS2300: Duplicate identifier 'y1'.
tests/cases/compiler/augmentedTypesFunction.ts(3,5): error TS2300: Duplicate identifier 'y1'.
tests/cases/compiler/augmentedTypesFunction.ts(6,10): error TS2393: Duplicate function implementation.
tests/cases/compiler/augmentedTypesFunction.ts(7,10): error TS2393: Duplicate function implementation.
tests/cases/compiler/augmentedTypesFunction.ts(9,10): error TS2300: Duplicate identifier 'y2a'.
tests/cases/compiler/augmentedTypesFunction.ts(10,5): error TS2300: Duplicate identifier 'y2a'.
tests/cases/compiler/augmentedTypesFunction.ts(13,10): error TS2814: Function with bodies can only merge with classes that are ambient.
tests/cases/compiler/augmentedTypesFunction.ts(14,7): error TS2813: Class declaration cannot implement overload list for 'y3'.
tests/cases/compiler/augmentedTypesFunction.ts(16,10): error TS2814: Function with bodies can only merge with classes that are ambient.
tests/cases/compiler/augmentedTypesFunction.ts(17,7): error TS2813: Class declaration cannot implement overload list for 'y3a'.
tests/cases/compiler/augmentedTypesFunction.ts(20,10): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
tests/cases/compiler/augmentedTypesFunction.ts(21,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
==== tests/cases/compiler/augmentedTypesFunction.ts (12 errors) ====
// function then var
function y1() { } // error
~~
!!! error TS2300: Duplicate identifier 'y1'.
var y1 = 1; // error
~~
!!! error TS2300: Duplicate identifier 'y1'.
// function then function
function y2() { } // error
~~
!!! error TS2393: Duplicate function implementation.
function y2() { } // error
~~
!!! error TS2393: Duplicate function implementation.
function y2a() { } // error
~~~
!!! error TS2300: Duplicate identifier 'y2a'.
var y2a = () => { } // error
~~~
!!! error TS2300: Duplicate identifier 'y2a'.
// function then class
function y3() { } // error
~~
!!! error TS2814: Function with bodies can only merge with classes that are ambient.
!!! related TS6506 tests/cases/compiler/augmentedTypesFunction.ts:14:7: Consider adding a 'declare' modifier to this class.
class y3 { } // error
~~
!!! error TS2813: Class declaration cannot implement overload list for 'y3'.
!!! related TS6506 tests/cases/compiler/augmentedTypesFunction.ts:14:7: Consider adding a 'declare' modifier to this class.
function y3a() { } // error
~~~
!!! error TS2814: Function with bodies can only merge with classes that are ambient.
!!! related TS6506 tests/cases/compiler/augmentedTypesFunction.ts:17:7: Consider adding a 'declare' modifier to this class.
class y3a { public foo() { } } // error
~~~
!!! error TS2813: Class declaration cannot implement overload list for 'y3a'.
!!! related TS6506 tests/cases/compiler/augmentedTypesFunction.ts:17:7: Consider adding a 'declare' modifier to this class.
// function then enum
function y4() { } // error
~~
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
enum y4 { One } // error
~~
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
// function then internal module
function y5() { }
module y5 { } // ok since module is not instantiated
function y5a() { }
module y5a { var y = 2; } // should be an error
function y5b() { }
module y5b { export var y = 3; } // should be an error
function y5c() { }
module y5c { export interface I { foo(): void } } // should be an error
// function then import, messes with other errors
//function y6() { }
//import y6 = require('');
|