Skip to content

Commit

Permalink
Improve JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
j3lte committed Apr 12, 2023
1 parent 251e812 commit 02fe652
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
10 changes: 5 additions & 5 deletions src/Select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function SelectMultipleFunc(
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/greatest.html
* Docs: https://dev.socrata.com/docs/functions/greatest.html
*/
export function SelectGreatest(
...fields: Array<
Expand All @@ -53,7 +53,7 @@ export function SelectGreatest(
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/least.html
* Docs: https://dev.socrata.com/docs/functions/least.html
*/
export function SelectLeast(
...fields: Array<
Expand All @@ -73,7 +73,7 @@ export function SelectLeast(
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/regr_intercept.html
* Docs: https://dev.socrata.com/docs/functions/regr_intercept.html
*/
export function SelectRegrIntercept(
xField: string | Field<DataType.Number>,
Expand All @@ -93,7 +93,7 @@ export function SelectRegrIntercept(
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/regr_r2.html
* Docs: https://dev.socrata.com/docs/functions/regr_r2.html
*/
export function SelectRegrR2(
xField: string | Field<DataType.Number>,
Expand All @@ -113,7 +113,7 @@ export function SelectRegrR2(
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/regr_slope.html
* Docs: https://dev.socrata.com/docs/functions/regr_slope.html
*/
export function SelectRegrSlope(
xField: string | Field<DataType.Number>,
Expand Down
46 changes: 23 additions & 23 deletions src/SelectImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class SelectImpl<T = DataType> {

/**
* Works on fields of type Number
* @url: https://dev.socrata.com/docs/functions/avg.html
* Docs: https://dev.socrata.com/docs/functions/avg.html
*/
avg(): SelectImpl<DataType.Number> {
if (!testFieldImpl(this.fieldObj, DataType.Number)) {
Expand All @@ -128,7 +128,7 @@ export class SelectImpl<T = DataType> {

/**
* Works on fields of type Number
* @url: https://dev.socrata.com/docs/functions/sum.html
* Docs: https://dev.socrata.com/docs/functions/sum.html
*/
sum(): SelectImpl<DataType.Number> {
if (!testFieldImpl(this.fieldObj, DataType.Number)) {
Expand All @@ -141,7 +141,7 @@ export class SelectImpl<T = DataType> {

/**
* Works like SELECT COUNT(*)
* @url: https://dev.socrata.com/docs/functions/count.html
* Docs: https://dev.socrata.com/docs/functions/count.html
*/
count(): SelectImpl<T> {
this.extraField = null;
Expand All @@ -151,7 +151,7 @@ export class SelectImpl<T = DataType> {

/**
* Returns distinct set of records
* @url: https://dev.socrata.com/docs/functions/distinct.html
* Docs: https://dev.socrata.com/docs/functions/distinct.html
*/
distinct(): SelectImpl<T> {
this.extraField = null;
Expand All @@ -166,7 +166,7 @@ export class SelectImpl<T = DataType> {
*
* _This function works with 2.1 endpoint(s)_
*
* @url: https://dev.socrata.com/docs/functions/max.html
* Docs: https://dev.socrata.com/docs/functions/max.html
*/
max(): SelectImpl<
| DataType.Number
Expand Down Expand Up @@ -199,7 +199,7 @@ export class SelectImpl<T = DataType> {
*
* _This function works with 2.1 endpoint(s)_
*
* @url: https://dev.socrata.com/docs/functions/min.html
* Docs: https://dev.socrata.com/docs/functions/min.html
*/
min(): SelectImpl<
| DataType.Number
Expand Down Expand Up @@ -230,7 +230,7 @@ export class SelectImpl<T = DataType> {
*
* Returns the minimum convex geometry that encloses all of another geometry's points.
*
* @url: https://dev.socrata.com/docs/functions/convex_hull.html
* Docs: https://dev.socrata.com/docs/functions/convex_hull.html
*/
convexHull(): SelectImpl<
| DataType.Point
Expand Down Expand Up @@ -279,7 +279,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_extract_d.html
* Docs: https://dev.socrata.com/docs/functions/date_extract_d.html
*/
dateExtractDayOfDate(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract(
Expand All @@ -295,7 +295,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_extract_dow.html
* Docs: https://dev.socrata.com/docs/functions/date_extract_dow.html
*/
dateExtractDayOfWeek(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract(
Expand All @@ -311,7 +311,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_extract_hh.html
* Docs: https://dev.socrata.com/docs/functions/date_extract_hh.html
*/
dateExtractHourOfDay(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract(
Expand All @@ -327,7 +327,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_extract_m.html
* Docs: https://dev.socrata.com/docs/functions/date_extract_m.html
*/
dateExtractMonth(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract(
Expand All @@ -343,7 +343,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_extract_mm.html
* Docs: https://dev.socrata.com/docs/functions/date_extract_mm.html
*/
dateExtractMinute(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract(
Expand All @@ -359,7 +359,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_extract_ss.html
* Docs: https://dev.socrata.com/docs/functions/date_extract_ss.html
*/
dateExtractSeconds(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract(
Expand All @@ -375,7 +375,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_extract_woy.html
* Docs: https://dev.socrata.com/docs/functions/date_extract_woy.html
*/
dateExtractWeekOfYear(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract(
Expand All @@ -391,7 +391,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_extract_y.html
* Docs: https://dev.socrata.com/docs/functions/date_extract_y.html
*/
dateExtractYear(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract(
Expand All @@ -407,7 +407,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.0 and 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_trunc_y.html
* Docs: https://dev.socrata.com/docs/functions/date_trunc_y.html
*/
dateTruncYear(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract("DATE_TRUNC_Y", SelectFunction.DateTruncYear);
Expand All @@ -420,7 +420,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.0 and 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_trunc_ym.html
* Docs: https://dev.socrata.com/docs/functions/date_trunc_ym.html
*/
dateTruncYearMonth(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract("DATE_TRUNC_YM", SelectFunction.DateTruncYearMonth);
Expand All @@ -433,7 +433,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.0 and 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/date_trunc_ymd.html
* Docs: https://dev.socrata.com/docs/functions/date_trunc_ymd.html
*/
dateTruncYearMonthDay(): SelectImpl<DataType.FloatingTimestamp> {
return this.dateExtract(
Expand All @@ -444,7 +444,7 @@ export class SelectImpl<T = DataType> {

/**
* Works on fields of type Point
* @url: https://dev.socrata.com/docs/functions/distance_in_meters.html
* Docs: https://dev.socrata.com/docs/functions/distance_in_meters.html
*/
distanceInMeters(lat: number, lon: number): SelectImpl<DataType.Point> {
if (!testFieldImpl(this.fieldObj, DataType.Point)) {
Expand Down Expand Up @@ -532,7 +532,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/num_points.html
* Docs: https://dev.socrata.com/docs/functions/num_points.html
*/
numberOfVertices(): SelectImpl<
| DataType.Polygon
Expand Down Expand Up @@ -565,7 +565,7 @@ export class SelectImpl<T = DataType> {
*
* @param tolerance The tolerance to use when simplifying the geometry, in meters
*
* @url: https://dev.socrata.com/docs/functions/simplify.html
* Docs: https://dev.socrata.com/docs/functions/simplify.html
*/
simplify(tolerance: number): SelectImpl<
| DataType.Line
Expand Down Expand Up @@ -596,7 +596,7 @@ export class SelectImpl<T = DataType> {
*
* @param tolerance The tolerance to use when simplifying the geometry, in meters
*
* @url: https://dev.socrata.com/docs/functions/simplify_preserve_topology.html
* Docs: https://dev.socrata.com/docs/functions/simplify_preserve_topology.html
*/
simplifyPreserveTopology(tolerance: number): SelectImpl<
| DataType.Line
Expand Down Expand Up @@ -629,7 +629,7 @@ export class SelectImpl<T = DataType> {
*
* __This function works with 2.1 endpoint(s)__
*
* @url: https://dev.socrata.com/docs/functions/extent.html
* Docs: https://dev.socrata.com/docs/functions/extent.html
*/
extent(): SelectImpl<
| DataType.Point
Expand Down

0 comments on commit 02fe652

Please sign in to comment.