Skip to content

Commit dbe738c

Browse files
committed
Force to always use Long
1 parent 44a0399 commit dbe738c

File tree

4 files changed

+26
-25
lines changed

4 files changed

+26
-25
lines changed

build.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const EXPORTS_FULL = `${EXPORTS_PATH}.js`
99
const args = [
1010
'--target', 'static-module',
1111
'--wrap', 'commonjs',
12+
'--force-long', // use Long, always
1213
// '--out', './exports.js',
1314
'./gtfs-realtime.proto'
1415
]

exports.d.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export namespace transit_realtime {
144144
incrementality?: (transit_realtime.FeedHeader.Incrementality|null);
145145

146146
/** FeedHeader timestamp */
147-
timestamp?: (number|Long|null);
147+
timestamp?: (Long|null);
148148
}
149149

150150
/** Represents a FeedHeader. */
@@ -163,7 +163,7 @@ export namespace transit_realtime {
163163
public incrementality: transit_realtime.FeedHeader.Incrementality;
164164

165165
/** FeedHeader timestamp. */
166-
public timestamp: (number|Long);
166+
public timestamp: Long;
167167

168168
/**
169169
* Creates a new FeedHeader instance using the specified properties.
@@ -372,7 +372,7 @@ export namespace transit_realtime {
372372
stopTimeUpdate?: (transit_realtime.TripUpdate.IStopTimeUpdate[]|null);
373373

374374
/** TripUpdate timestamp */
375-
timestamp?: (number|Long|null);
375+
timestamp?: (Long|null);
376376

377377
/** TripUpdate delay */
378378
delay?: (number|null);
@@ -397,7 +397,7 @@ export namespace transit_realtime {
397397
public stopTimeUpdate: transit_realtime.TripUpdate.IStopTimeUpdate[];
398398

399399
/** TripUpdate timestamp. */
400-
public timestamp: (number|Long);
400+
public timestamp: Long;
401401

402402
/** TripUpdate delay. */
403403
public delay: number;
@@ -482,7 +482,7 @@ export namespace transit_realtime {
482482
delay?: (number|null);
483483

484484
/** StopTimeEvent time */
485-
time?: (number|Long|null);
485+
time?: (Long|null);
486486

487487
/** StopTimeEvent uncertainty */
488488
uncertainty?: (number|null);
@@ -501,7 +501,7 @@ export namespace transit_realtime {
501501
public delay: number;
502502

503503
/** StopTimeEvent time. */
504-
public time: (number|Long);
504+
public time: Long;
505505

506506
/** StopTimeEvent uncertainty. */
507507
public uncertainty: number;
@@ -724,7 +724,7 @@ export namespace transit_realtime {
724724
currentStatus?: (transit_realtime.VehiclePosition.VehicleStopStatus|null);
725725

726726
/** VehiclePosition timestamp */
727-
timestamp?: (number|Long|null);
727+
timestamp?: (Long|null);
728728

729729
/** VehiclePosition congestionLevel */
730730
congestionLevel?: (transit_realtime.VehiclePosition.CongestionLevel|null);
@@ -761,7 +761,7 @@ export namespace transit_realtime {
761761
public currentStatus: transit_realtime.VehiclePosition.VehicleStopStatus;
762762

763763
/** VehiclePosition timestamp. */
764-
public timestamp: (number|Long);
764+
public timestamp: Long;
765765

766766
/** VehiclePosition congestionLevel. */
767767
public congestionLevel: transit_realtime.VehiclePosition.CongestionLevel;
@@ -1032,10 +1032,10 @@ export namespace transit_realtime {
10321032
interface ITimeRange {
10331033

10341034
/** TimeRange start */
1035-
start?: (number|Long|null);
1035+
start?: (Long|null);
10361036

10371037
/** TimeRange end */
1038-
end?: (number|Long|null);
1038+
end?: (Long|null);
10391039
}
10401040

10411041
/** Represents a TimeRange. */
@@ -1048,10 +1048,10 @@ export namespace transit_realtime {
10481048
constructor(properties?: transit_realtime.ITimeRange);
10491049

10501050
/** TimeRange start. */
1051-
public start: (number|Long);
1051+
public start: Long;
10521052

10531053
/** TimeRange end. */
1054-
public end: (number|Long);
1054+
public end: Long;
10551055

10561056
/**
10571057
* Creates a new TimeRange instance using the specified properties.

exports.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ $root.transit_realtime = (function() {
298298
* @interface IFeedHeader
299299
* @property {string} gtfsRealtimeVersion FeedHeader gtfsRealtimeVersion
300300
* @property {transit_realtime.FeedHeader.Incrementality|null} [incrementality] FeedHeader incrementality
301-
* @property {number|Long|null} [timestamp] FeedHeader timestamp
301+
* @property {Long|null} [timestamp] FeedHeader timestamp
302302
*/
303303

304304
/**
@@ -334,7 +334,7 @@ $root.transit_realtime = (function() {
334334

335335
/**
336336
* FeedHeader timestamp.
337-
* @member {number|Long} timestamp
337+
* @member {Long} timestamp
338338
* @memberof transit_realtime.FeedHeader
339339
* @instance
340340
*/
@@ -863,7 +863,7 @@ $root.transit_realtime = (function() {
863863
* @property {transit_realtime.ITripDescriptor} trip TripUpdate trip
864864
* @property {transit_realtime.IVehicleDescriptor|null} [vehicle] TripUpdate vehicle
865865
* @property {Array.<transit_realtime.TripUpdate.IStopTimeUpdate>|null} [stopTimeUpdate] TripUpdate stopTimeUpdate
866-
* @property {number|Long|null} [timestamp] TripUpdate timestamp
866+
* @property {Long|null} [timestamp] TripUpdate timestamp
867867
* @property {number|null} [delay] TripUpdate delay
868868
*/
869869

@@ -909,7 +909,7 @@ $root.transit_realtime = (function() {
909909

910910
/**
911911
* TripUpdate timestamp.
912-
* @member {number|Long} timestamp
912+
* @member {Long} timestamp
913913
* @memberof transit_realtime.TripUpdate
914914
* @instance
915915
*/
@@ -1181,7 +1181,7 @@ $root.transit_realtime = (function() {
11811181
* @memberof transit_realtime.TripUpdate
11821182
* @interface IStopTimeEvent
11831183
* @property {number|null} [delay] StopTimeEvent delay
1184-
* @property {number|Long|null} [time] StopTimeEvent time
1184+
* @property {Long|null} [time] StopTimeEvent time
11851185
* @property {number|null} [uncertainty] StopTimeEvent uncertainty
11861186
*/
11871187

@@ -1210,7 +1210,7 @@ $root.transit_realtime = (function() {
12101210

12111211
/**
12121212
* StopTimeEvent time.
1213-
* @member {number|Long} time
1213+
* @member {Long} time
12141214
* @memberof transit_realtime.TripUpdate.StopTimeEvent
12151215
* @instance
12161216
*/
@@ -1755,7 +1755,7 @@ $root.transit_realtime = (function() {
17551755
* @property {number|null} [currentStopSequence] VehiclePosition currentStopSequence
17561756
* @property {string|null} [stopId] VehiclePosition stopId
17571757
* @property {transit_realtime.VehiclePosition.VehicleStopStatus|null} [currentStatus] VehiclePosition currentStatus
1758-
* @property {number|Long|null} [timestamp] VehiclePosition timestamp
1758+
* @property {Long|null} [timestamp] VehiclePosition timestamp
17591759
* @property {transit_realtime.VehiclePosition.CongestionLevel|null} [congestionLevel] VehiclePosition congestionLevel
17601760
* @property {transit_realtime.VehiclePosition.OccupancyStatus|null} [occupancyStatus] VehiclePosition occupancyStatus
17611761
*/
@@ -1825,7 +1825,7 @@ $root.transit_realtime = (function() {
18251825

18261826
/**
18271827
* VehiclePosition timestamp.
1828-
* @member {number|Long} timestamp
1828+
* @member {Long} timestamp
18291829
* @memberof transit_realtime.VehiclePosition
18301830
* @instance
18311831
*/
@@ -2838,8 +2838,8 @@ $root.transit_realtime = (function() {
28382838
* Properties of a TimeRange.
28392839
* @memberof transit_realtime
28402840
* @interface ITimeRange
2841-
* @property {number|Long|null} [start] TimeRange start
2842-
* @property {number|Long|null} [end] TimeRange end
2841+
* @property {Long|null} [start] TimeRange start
2842+
* @property {Long|null} [end] TimeRange end
28432843
*/
28442844

28452845
/**
@@ -2859,15 +2859,15 @@ $root.transit_realtime = (function() {
28592859

28602860
/**
28612861
* TimeRange start.
2862-
* @member {number|Long} start
2862+
* @member {Long} start
28632863
* @memberof transit_realtime.TimeRange
28642864
* @instance
28652865
*/
28662866
TimeRange.prototype.start = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
28672867

28682868
/**
28692869
* TimeRange end.
2870-
* @member {number|Long} end
2870+
* @member {Long} end
28712871
* @memberof transit_realtime.TimeRange
28722872
* @instance
28732873
*/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gtfs-rb",
33
"description": "Generated JavaScript library based on the GTFS Realtime protocol buffer specification",
4-
"version": "1.2.7",
4+
"version": "1.2.8",
55
"main": "exports.js",
66
"scripts": {
77
"build": "node build.js"

0 commit comments

Comments
 (0)