Repository: sequelize/sequelize
File: packages/core/src/dialects/abstract/data-types.ts (TypeScript)

Code before:
    }

    return replacement;
  }

  attachUsageContext(usageContext: DataTypeUseContext): this {
    if (!isString(this.options.type)) {
      this.options.type.attachUsageContext(usageContext);
    }

    return super.attachUsageContext(usageContext);
  }

  static is<T extends AbstractDataType<any>>(obj: unknown, type: new () => T): obj is ARRAY<T> {
    return obj instanceof ARRAY && obj.options.type instanceof type;
  }
}

export interface GeometryOptions {
  type?: GeoJsonType | undefined;
  srid?: number | undefined;
}

/**
 * A column storing Geometry information.
 * It is only available in PostgreSQL (with PostGIS), MariaDb or MySQL.
 *
 * GeoJSON is accepted as input and returned as output.
 *
 * In PostGIS, the GeoJSON is parsed using the PostGIS function `STGeomFromGeoJSON`.
 * In MySQL it is parsed using the function `STGeomFromText`.
 *
 * Therefore, one can just follow the [GeoJSON spec](https://tools.ietf.org/html/rfc7946) for handling geometry objects.  See the following examples:
 *
 * __Fallback policy:__
 * If this type is not supported, an error will be raised.
 *
 * @example Defining a Geometry type attribute
 * ```ts
 * DataTypes.GEOMETRY
 * DataTypes.GEOMETRY('POINT')
 * DataTypes.GEOMETRY('POINT', 4326)
 * ```
 *
 * @example Create a new point
 * ```ts
 * const point = { type: 'Point', coordinates: [-76.984722, 39.807222]}; // GeoJson format: [lng, lat]
 *
 * User.create({username: 'username', geometry: point });
 * ```
 *

Review comment (suggestion):
```suggestion
 * It is only available in PostgreSQL (with PostGIS), MariaDB or MySQL.
```


Code after:

    return replacement;
  }

  attachUsageContext(usageContext: DataTypeUseContext): this {
    if (!isString(this.options.type)) {
      this.options.type.attachUsageContext(usageContext);
    }

    return super.attachUsageContext(usageContext);
  }

  static is<T extends AbstractDataType<any>>(obj: unknown, type: new () => T): obj is ARRAY<T> {
    return obj instanceof ARRAY && obj.options.type instanceof type;
  }
}

export interface GeometryOptions {
  type?: GeoJsonType | undefined;
  srid?: number | undefined;
}

/**
 * A column storing Geometry information.
 * It is only available in PostgreSQL (with PostGIS), MariaDB or MySQL.
 *
 * GeoJSON is accepted as input and returned as output.
 *
 * In PostGIS, the GeoJSON is parsed using the PostGIS function `STGeomFromGeoJSON`.
 * In MySQL it is parsed using the function `STGeomFromText`.
 *
 * Therefore, one can just follow the [GeoJSON spec](https://tools.ietf.org/html/rfc7946) for handling geometry objects.  See the following examples:
 *
 * __Fallback policy:__
 * If this type is not supported, an error will be raised.
 *
 * @example Defining a Geometry type attribute
 * ```ts
 * DataTypes.GEOMETRY
 * DataTypes.GEOMETRY('POINT')
 * DataTypes.GEOMETRY('POINT', 4326)
 * ```
 *
 * @example Create a new point
 * ```ts
 * const point = { type: 'Point', coordinates: [-76.984722, 39.807222]}; // GeoJson format: [lng, lat]
 *
 * User.create({username: 'username', geometry: point });
 * ```
 *
 * @example Create a new linestring