2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts (4 errors) ====
|
|
|
|
declare function _<T>(value: Array<T>): _<T>;
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name '_'.
|
2014-07-13 01:04:16 +02:00
|
|
|
declare function _<T>(value: T): _<T>;
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name '_'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
declare module _ {
|
|
|
|
export function each<T>(
|
|
|
|
//list: List<T>,
|
|
|
|
//iterator: ListIterator<T, void>,
|
|
|
|
context?: any): void;
|
|
|
|
|
|
|
|
interface ListIterator<T, TResult> {
|
|
|
|
(value: T, index: number, list: T[]): TResult;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
declare class _<T> {
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier '_'.
|
2014-07-13 01:04:16 +02:00
|
|
|
each(iterator: _.ListIterator<T, void>, context?: any): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
module MyModule {
|
|
|
|
export class MyClass {
|
|
|
|
public get myGetter() {
|
|
|
|
~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-07-13 01:04:16 +02:00
|
|
|
var obj:any = {};
|
|
|
|
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|