# HG changeset patch # User Lucas Thompson # Date 1500643742 -3600 # Node ID 3c962af5342c153259f18fb14563c1e1557f79e1 # Parent 33b4106af9dd4ee8e3ab88e76df0cf7d8701f04f Work-around for causing a compile error for non-exhaustive switch on discriminated union. diff -r 33b4106af9dd -r 3c962af5342c src/app/visualisations/FeatureUtilities.ts --- a/src/app/visualisations/FeatureUtilities.ts Fri Jul 21 14:21:26 2017 +0100 +++ b/src/app/visualisations/FeatureUtilities.ts Fri Jul 21 14:29:02 2017 +0100 @@ -109,7 +109,10 @@ return ['vector', 'matrix', 'tracks'].includes(shape); } -const throwShapeError = () => { throw new Error('No shape could be deduced'); }; +function throwShapeError(compileAssertion?: never) { + throw new Error('No shape could be deduced'); +} + function deduceHigherLevelFeatureShape(response: SimpleResponse) : HigherLevelFeatureShape { const collection = response.features; @@ -180,7 +183,7 @@ })) }; } - throwShapeError(); + throwShapeError(deducedShape); } export interface PlotDataPoint {