declare class I { map( mapper: (value?: V) => M ): I; } var i:I = new I(); var j:I = i.map(id => id);