Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

List.map return array and not typed List #95

Open
qballer opened this issue Mar 7, 2017 · 0 comments
Open

List.map return array and not typed List #95

qballer opened this issue Mar 7, 2017 · 0 comments

Comments

@qballer
Copy link
Contributor

qballer commented Mar 7, 2017

I have the following code

function changeCollection(rawData:List<RawData>): List<Data> {
    let filtered:List<RawData> = rawData.filter((value)=>  true/** some condition */)
    console.log('Wo: ',  filtered) // looks good
    let mapped:List<Template> =  filtered.map(rawToData) // returns [] instead of List<Data>
    return mapped;
}
function rawToData(val:RawData):Data{/*Impel*/}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant