Skip to content
Snippets Groups Projects
Commit 2c49a423 authored by Alexander Rose's avatar Alexander Rose
Browse files

type assertion

parent 8a266e70
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ import { PluginContext } from '../../mol-plugin/context'; ...@@ -15,6 +15,7 @@ import { PluginContext } from '../../mol-plugin/context';
import { Assembly, Symmetry } from '../../mol-model/structure/model/properties/symmetry'; import { Assembly, Symmetry } from '../../mol-model/structure/model/properties/symmetry';
import { PluginStateObject as SO } from '../objects'; import { PluginStateObject as SO } from '../objects';
import { ModelSymmetry } from '../../mol-model-formats/structure/property/symmetry'; import { ModelSymmetry } from '../../mol-model-formats/structure/property/symmetry';
import { assertUnreachable } from '../../mol-util/type-helpers';
const CommonStructureParams = { const CommonStructureParams = {
dynamicBonds: PD.Optional(PD.Boolean(false, { description: 'Ensure bonds are recalculated upon model changes. Also enables calculation of inter-unit bonds in water molecules and ions.' })), dynamicBonds: PD.Optional(PD.Boolean(false, { description: 'Ensure bonds are recalculated upon model changes. Also enables calculation of inter-unit bonds in water molecules and ions.' })),
...@@ -188,6 +189,6 @@ export namespace RootStructureDefinition { ...@@ -188,6 +189,6 @@ export namespace RootStructureDefinition {
return buildSymmetryAssembly(ctx, model, params.params.generators, symmetry, props); return buildSymmetryAssembly(ctx, model, params.params.generators, symmetry, props);
} }
throw new Error(`Unknown represetation type: ${(params as any).name}`); assertUnreachable(params);
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment