forked from MapComplete/MapComplete
docs: improve typing
This commit is contained in:
parent
a8949ab899
commit
0dcc20f20b
1 changed files with 6 additions and 0 deletions
|
@ -163,6 +163,11 @@ export abstract class OsmObject {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static DownloadHistory(id: NodeId): UIEventSource<OsmNode[]>
|
||||||
|
public static DownloadHistory(id: WayId): UIEventSource<OsmWay[]>
|
||||||
|
public static DownloadHistory(id: RelationId): UIEventSource<OsmRelation[]>
|
||||||
|
|
||||||
|
public static DownloadHistory(id: OsmId): UIEventSource<OsmObject[]>
|
||||||
public static DownloadHistory(id: string): UIEventSource<OsmObject[]> {
|
public static DownloadHistory(id: string): UIEventSource<OsmObject[]> {
|
||||||
if (OsmObject.historyCache.has(id)) {
|
if (OsmObject.historyCache.has(id)) {
|
||||||
return OsmObject.historyCache.get(id)
|
return OsmObject.historyCache.get(id)
|
||||||
|
@ -180,6 +185,7 @@ export abstract class OsmObject {
|
||||||
const osmObjects: OsmObject[] = []
|
const osmObjects: OsmObject[] = []
|
||||||
for (const element of elements) {
|
for (const element of elements) {
|
||||||
let osmObject: OsmObject = null
|
let osmObject: OsmObject = null
|
||||||
|
element.nodes = []
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "node":
|
case "node":
|
||||||
osmObject = new OsmNode(idN)
|
osmObject = new OsmNode(idN)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue