Answers for "Cannot create property 'coordinates' on string 'MultiPolygon' mongoose"

1

Cannot create property 'coordinates' on string 'MultiPolygon' mongoose

// Using NestJs, you can define polygon or multipolygon schemas using raw format
	import { ..., raw } from '@nestjs/mongoose';

 	@Prop(
        raw({
            type: { type: String, enum: ['Polygon', 'MultiPolygon'] },
            coordinates: { type: [[[[Number]]]] }
        })
    )
    location: Record<string, any>;
Posted by: Guest on February-19-2022

Code answers related to "Cannot create property 'coordinates' on string 'MultiPolygon' mongoose"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language