Skip to content

Commit

Permalink
fix: don't import anything externally to worker
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonflatval-cognite committed May 18, 2022
1 parent 1ebfca3 commit 6c9f639
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { RawCylinder, Cylinder } from './Cylinder';
import { RawCompositeShape, CompositeShape } from './CompositeShape';
import { Box, RawBox } from './Box';

import { assertNever } from '@reveal/utilities';

export function fromRawShape(rawShape: IRawShape): IShape {
switch (rawShape.type) {
case 'cylinder':
Expand All @@ -23,6 +21,6 @@ export function fromRawShape(rawShape: IRawShape): IShape {
const rawComposite = rawShape as RawCompositeShape;
return new CompositeShape(rawComposite.shapes.map(fromRawShape));
default:
assertNever(rawShape.type);
throw Error(`Could not recognize raw shape type ${rawShape.type}`);
}
}

0 comments on commit 6c9f639

Please sign in to comment.