---
title: "StyleSwapOptions | 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 StyleSwapOptions

The options object related to the [Map](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/)'s style related methods

type StyleSwapOptions \= {  
    [diff](#diff)?: boolean;  
    [transformStyle](#transformstyle)?: [TransformStyleFunction](https://docs.maptiler.com/sdk-js/api-reference/types/TransformStyleFunction/);  
}

##### Index

### Properties[](#properties)

[diff?](#diff) [transformStyle?](#transformstyle)

## Properties[](#properties-1)

### `Optional`diff[](#diff)

diff?: boolean

If false, force a 'full' update, removing the current style and building the given one instead of attempting a diff-based update.

### `Optional`transformStyle[](#transformstyle)

transformStyle?: [TransformStyleFunction](https://docs.maptiler.com/sdk-js/api-reference/types/TransformStyleFunction/)

TransformStyleFunction is a convenience function that allows to modify a style after it is fetched but before it is committed to the map state. Refer to [TransformStyleFunction](https://docs.maptiler.com/sdk-js/api-reference/types/TransformStyleFunction/).
