Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 9
    That gives me Property 'flat' does not exist on type 'string[][]'. `
    – lonix
    Commented Jun 11, 2019 at 13:17
  • 5
    @lonix you need to add esnext to libs in tsconfig to make that work
    – baao
    Commented Jun 11, 2019 at 13:20
  • 1
    Oh okay now that makes sense :-) But I excluded that for a reason, I'm not using anything bleeding edge till it's current. Would be nice to have that feature right now though!
    – lonix
    Commented Jun 11, 2019 at 13:27
  • I added an option to use concat, you have to specify the type of bar to be string[] and not string[][]
    – Kokodoko
    Commented Jun 11, 2019 at 13:28
  • I think this is the best answer for those using the latest features, unfortunately for me I'll need to use the old for loop! :)
    – lonix
    Commented Jun 11, 2019 at 13:29