Skip to content

Commit

Permalink
export string union values at definition
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 4, 2022
1 parent 0e9a146 commit 89bb4d4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
6 changes: 2 additions & 4 deletions js/common/model/FocalLengthModelType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

const FocalLengthModelTypeValues = [ 'direct', 'indirect' ] as const;
export type FocalLengthModelType = ( typeof FocalLengthModelTypeValues )[number];

export { FocalLengthModelTypeValues };
export const FocalLengthModelTypeValues = [ 'direct', 'indirect' ] as const;
export type FocalLengthModelType = ( typeof FocalLengthModelTypeValues )[number];
6 changes: 2 additions & 4 deletions js/common/model/OpticShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

const OpticShapeValues = [ 'convex', 'concave', 'flat' ] as const;
export type OpticShape = ( typeof OpticShapeValues )[number];

export { OpticShapeValues };
export const OpticShapeValues = [ 'convex', 'concave', 'flat' ] as const;
export type OpticShape = ( typeof OpticShapeValues )[number];
4 changes: 1 addition & 3 deletions js/common/model/OpticalImageType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

const OpticalImageTypeValues = [ 'real', 'virtual' ] as const;
export const OpticalImageTypeValues = [ 'real', 'virtual' ] as const;
export type OpticalImageType = ( typeof OpticalImageTypeValues )[number];

export { OpticalImageTypeValues };

4 changes: 1 addition & 3 deletions js/common/model/RaysType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

const RaysTypeValues = [ 'marginal', 'principal', 'many', 'none' ] as const;
export const RaysTypeValues = [ 'marginal', 'principal', 'many', 'none' ] as const;
export type RaysType = ( typeof RaysTypeValues )[number];

export { RaysTypeValues };

0 comments on commit 89bb4d4

Please sign in to comment.