# @types/leaflet.featuregroup.subgroup

> TypeScript definitions for leaflet.featuregroup.subgroup

Latest version **1.0.4** (published 2025-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/leaflet.featuregroup.subgroup
pnpm add @types/leaflet.featuregroup.subgroup
yarn add @types/leaflet.featuregroup.subgroup
bun add @types/leaflet.featuregroup.subgroup
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2025-09-03 |
| First published | 2019-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51441 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/leaflet.featuregroup.subgroup
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet.featuregroup.subgroup
- npm.io page: https://npm.io/package/@types/leaflet.featuregroup.subgroup

## Dependencies (1)

- [@types/leaflet](https://npm.io/package/@types/leaflet.md) ^1.9

## Recent versions

- 1.0.4 (latest) — 2025-09-03
- 1.0.3 (ts4.5) — 2023-11-07
- 1.0.1 (ts4.3) — 2023-08-30
- 1.0.0 (ts2.3) — 2019-08-08
- 1.0.2 — 2023-10-18

## README

# Installation
> `npm install --save @types/leaflet.featuregroup.subgroup`

# Summary
This package contains type definitions for leaflet.featuregroup.subgroup (https://github.com/ghybs/Leaflet.FeatureGroup.SubGroup).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet.featuregroup.subgroup.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet.featuregroup.subgroup/index.d.ts)
````ts
import * as L from "leaflet";

declare module "leaflet" {
    namespace FeatureGroup {
        /**
         * An extended FeatureGroup that adds its child layers into a parent
         * group when added to a map (e.g., through L.Control.Layers). Typical
         * usage is to dynamically add and remove groups of markers from marker
         * clusters.
         */
        class SubGroup<P = any> extends FeatureGroup<P> {
            /**
             * Instantiates a SubGroup.
             */
            constructor(parentGroup?: LayerGroup, layers?: Layer[]);

            /**
             * Changes the parent group into which child markers are added to or
             * removed from.
             */
            setParentGroup(parentGroup: LayerGroup): this;

            /**
             * Removes the current sub-group from map before changing the parent
             * group. Re-adds the sub-group to map if it was before changing.
             */
            setParentGroupSafe(parentGroup: LayerGroup): this;

            /**
             * Returns the current parent group.
             */
            getParentGroup(): LayerGroup;
        }
    }

    namespace featureGroup {
        /**
         * Creates a feature subgroup, optionally given an initial parent group and a set of layers.
         */
        function subGroup(parentGroup?: LayerGroup, layers?: Layer[]): FeatureGroup.SubGroup;
    }
}

````

### Additional Details
 * Last updated: Wed, 03 Sep 2025 08:02:48 GMT
 * Dependencies: [@types/leaflet](https://npmjs.com/package/@types/leaflet)

# Credits
These definitions were written by [Thomas Revesz](https://github.com/drtomato).

---
_Source: https://npm.io/package/@types/leaflet.featuregroup.subgroup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
