UNPKG

2.29 kBJavaScriptView Raw
1
2/**
3 * @fileoverview Externs for TopoJSON.
4 * @see https://github.com/mbostock/topojson/wiki/Specification
5 * @externs
6 */
7
8
9
10/**
11 * @constructor
12 */
13var TopoJSONTopology = function() {};
14
15
16/**
17 * @type {string}
18 */
19TopoJSONTopology.prototype.type;
20
21
22/**
23 * @type {TopoJSONTransform|undefined}
24 */
25TopoJSONTopology.prototype.transform;
26
27
28/**
29 * @type {Object.<string, (TopoJSONGeometry|TopoJSONGeometryCollection)>}
30 */
31TopoJSONTopology.prototype.objects;
32
33
34/**
35 * @type {!Array.<Array.<Array.<number>>>}
36 */
37TopoJSONTopology.prototype.arcs;
38
39
40
41/**
42 * @constructor
43 */
44var TopoJSONTransform = function() {};
45
46
47/**
48 * @type {!Array.<number>}
49 */
50TopoJSONTransform.prototype.scale;
51
52
53/**
54 * @type {!Array.<number>}
55 */
56TopoJSONTransform.prototype.translate;
57
58
59
60/**
61 * @constructor
62 */
63var TopoJSONGeometry = function() {};
64
65
66/**
67 * @type {string}
68 */
69TopoJSONGeometry.prototype.type;
70
71
72/**
73 * @type {string|number|undefined}
74 */
75TopoJSONGeometry.prototype.id;
76
77
78/**
79 * @type {Object.<string, *>|undefined}
80 */
81TopoJSONGeometry.prototype.properties;
82
83
84/**
85 * @constructor
86 */
87var TopoJSONGeometryCollection = function() {};
88
89
90/**
91 * @type {Array.<TopoJSONGeometry>}
92 */
93TopoJSONGeometryCollection.prototype.geometries;
94
95
96
97/**
98 * @constructor
99 * @extends {TopoJSONGeometry}
100 */
101var TopoJSONPoint = function() {};
102
103
104/**
105 * @type {!Array.<number>}
106 */
107TopoJSONPoint.prototype.coordinates;
108
109
110
111/**
112 * @constructor
113 * @extends {TopoJSONGeometry}
114 */
115var TopoJSONLineString = function() {};
116
117
118/**
119 * @type {!Array.<number>}
120 */
121TopoJSONLineString.prototype.arcs;
122
123
124
125/**
126 * @constructor
127 * @extends {TopoJSONGeometry}
128 */
129var TopoJSONPolygon = function() {};
130
131
132/**
133 * @type {!Array.<Array.<number>>}
134 */
135TopoJSONPolygon.prototype.arcs;
136
137
138
139/**
140 * @constructor
141 * @extends {TopoJSONGeometry}
142 */
143var TopoJSONMultiPoint = function() {};
144
145
146/**
147 * @type {!Array.<Array.<number>>}
148 */
149TopoJSONMultiPoint.prototype.coordinates;
150
151
152
153/**
154 * @constructor
155 * @extends {TopoJSONGeometry}
156 */
157var TopoJSONMultiLineString = function() {};
158
159
160/**
161 * @type {!Array.<Array.<number>>}
162 */
163TopoJSONMultiLineString.prototype.arcs;
164
165
166
167/**
168 * @constructor
169 * @extends {TopoJSONGeometry}
170 */
171var TopoJSONMultiPolygon = function() {};
172
173
174/**
175 * @type {!Array.<Array.<Array.<number>>>}
176 */
177TopoJSONMultiPolygon.prototype.arcs;