(map: MapInstance, id: string, props: SourceProps)
| 25 | let sourceCounter = 0; |
| 26 | |
| 27 | function createSource(map: MapInstance, id: string, props: SourceProps) { |
| 28 | // @ts-ignore |
| 29 | if (map.style && map.style._loaded) { |
| 30 | const options = {...props}; |
| 31 | delete options.id; |
| 32 | delete options.children; |
| 33 | // @ts-ignore |
| 34 | map.addSource(id, options); |
| 35 | return map.getSource(id); |
| 36 | } |
| 37 | return null; |
| 38 | } |
| 39 | |
| 40 | /* eslint-disable complexity */ |
| 41 | function updateSource(source: AnySourceImplementation, props: SourceProps, prevProps: SourceProps) { |
no outgoing calls
no test coverage detected
searching dependent graphs…