---
title: "FlatArray | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias FlatArray<Arr, Depth>

FlatArray: {  
    done: [Arr](#arr);  
    recur: [Arr](#arr) extends ReadonlyArray<infer InnerArr\>  
        ? FlatArray<  
            InnerArr,  
            \[  
                \-1,  
                0,  
                1,  
                2,  
                3,  
                4,  
                5,  
                6,  
                7,  
                8,  
                9,  
                10,  
                11,  
                12,  
                13,  
                14,  
                15,  
                16,  
                17,  
                18,  
                19,  
                20,  
            \]\[[Depth](#depth)\],  
        \>  
        : [Arr](#arr);  
}\[[Depth](#depth) extends \-1 ? "done" : "recur"\]

#### Type Parameters

-   Arr
-   Depth extends number
