mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Allow for custom keys in TileLayerOptions
According to https://github.com/Microsoft/TypeScript/issues/3755, properties not previously defined in a type will now be marked as errors during compilation in TypeScript 1.6 and later. Since a TileLayerOptions object is dynamically evaluated for custom properties that might be used in a provided tile URL template, the TypeScript change breaks this functionality. The proposed change adds a string indexer (one of the suggested changes in the link above), which fixes the issue.
This commit is contained in:
Vendored
+5
@@ -4176,6 +4176,11 @@ declare namespace L {
|
||||
* When this option is set, the TileLayer only loads tiles that are in the given geographical bounds.
|
||||
*/
|
||||
bounds?: LatLngBounds;
|
||||
|
||||
/**
|
||||
* Custom keys may be specified in TileLayerOptions so they can be used in a provided URL template.
|
||||
*/
|
||||
[additionalKeys: string]: any;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user