forked from MapComplete/MapComplete
Refactoring: move all code files into a src directory
This commit is contained in:
parent
de99f56ca8
commit
e75d2789d2
389 changed files with 0 additions and 12 deletions
24
src/Logic/FeatureSource/FeatureSource.ts
Normal file
24
src/Logic/FeatureSource/FeatureSource.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { Store, UIEventSource } from "../UIEventSource"
|
||||
import FilteredLayer from "../../Models/FilteredLayer"
|
||||
import { Feature } from "geojson"
|
||||
|
||||
export interface FeatureSource<T extends Feature = Feature> {
|
||||
features: Store<T[]>
|
||||
}
|
||||
export interface WritableFeatureSource<T extends Feature = Feature> extends FeatureSource<T> {
|
||||
features: UIEventSource<T[]>
|
||||
}
|
||||
|
||||
/**
|
||||
* A feature source which only contains features for the defined layer
|
||||
*/
|
||||
export interface FeatureSourceForLayer<T extends Feature = Feature> extends FeatureSource<T> {
|
||||
readonly layer: FilteredLayer
|
||||
}
|
||||
|
||||
/**
|
||||
* A feature source which is aware of the indexes it contains
|
||||
*/
|
||||
export interface IndexedFeatureSource extends FeatureSource {
|
||||
readonly featuresById: Store<Map<string, Feature>>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue