From f6fbbec6a8e7dd6aff8a081af3d2524ba60e99dc Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 19 Jul 2018 07:56:50 -0700 Subject: [PATCH] topojson-specification: Make compatible with ts3.0 (#27379) --- .../topojson-specification-tests.ts | 39 +++---------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/types/topojson-specification/topojson-specification-tests.ts b/types/topojson-specification/topojson-specification-tests.ts index c86ed57b3f..666b1d95b7 100644 --- a/types/topojson-specification/topojson-specification-tests.ts +++ b/types/topojson-specification/topojson-specification-tests.ts @@ -154,41 +154,14 @@ topology = { // Fails +// must fail on "type" // $ExpectError -topology = { - type: "Topology", - objects: { - foo: { - type: "hello", // must fail - arcs: [[0]], - }, - }, - arcs: [], -}; +topology = { type: "Topology", objects: { foo: { type: "hello", arcs: [[0]] } }, arcs: [] }; +// must fail: Property 'coordinates' is missing in type '{ type: "Point"; }'. // $ExpectError -topology = { - type: "Topology", - objects: { - foo: { - type: "Point", - // must fail: Property 'coordinates' is missing in type '{ type: "Point"; }'. - }, - }, - arcs: [], -}; +topology = { type: "Topology", objects: { foo: { type: "Point" } }, arcs: [] }; +// must fail: Property 'arcs' is missing in type '{ type: "Polygon"; }' // $ExpectError -topology = { - type: "Topology", - objects: { - foo: { - type: "GeometryCollection", - geometries: [ - {type: "Polygon"} - // must fail: Property 'arcs' is missing in type '{ type: "Polygon"; }' - ], - }, - }, - arcs: [], -}; +topology = { type: "Topology", objects: { foo: { type: "GeometryCollection", geometries: [{type: "Polygon"}] } }, arcs: [] };