DefinitelyTyped/types/mongoose-geojson-schema/index.d.ts
Richard Davison 22761c884a [@types/mongoose] Accept deep partial in model interface (#36877)
* Add deep partial

* Change typescript version to 2.8

* Change connect-mongo typescript version to 2.8

* Change joigoose typescript version to 2.8

* Update packages depending on mongoose to ts 2.8

* Update packages depending on mongoose to ts 2.8

* Update packages depending on mongoose to ts 2.8

* Update packages depending on mongoose to ts 2.8

* Update packages depending on mongoose to ts 2.8

* Update packages depending on mongoose to ts 2.8

* Update packages depending on mongoose to ts 2.8

* Update test to cover deep partial

* Restore format
2019-07-19 10:17:17 -07:00

80 lines
2.4 KiB
TypeScript

// Type definitions for mongoose-geojson-schema 2.1
// Project: https://github.com/rideamigoscorp/mongoose-geojson-schema#readme
// Definitions by: Bond <https://github.com/bondz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import mongoose = require('mongoose');
declare module 'mongoose' {
namespace Schema {
namespace Types {
class GeoJSON extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'GeoJSON';
}
class Point extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'Point';
}
class MultiPoint extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'MultiPoint';
}
class LineString extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'LineString';
}
class MultiLineString extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'MultiLineString';
}
class Polygon extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'Polygon';
}
class MultiPolygon extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'MultiPolygon';
}
class Geometry extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'Geometry';
}
class GeometryCollection extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'GeometryCollection';
}
class Feature extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'Feature';
}
class FeatureCollection extends SchemaType {
constructor(key: string, options?: object);
cast(geojson: object): this;
static schemaName: 'FeatureCollection';
}
}
}
}