unsplash / sum-types

Safe, ergonomic, non-generic sum types in TypeScript.
https://unsplash.github.io/sum-types/
MIT License
42 stars 2 forks source link

Export more stuff #47

Closed OliverJAsh closed 2 years ago

OliverJAsh commented 2 years ago

Without these exports, this errors when the declaration compiler option is enabled:

import * as Sum from 'shared/facades/Sum';

export type Mode = Sum.Member<'SubmitToBrief'> | Sum.Member<'Publish'>;
export const {
  mk,
  // Exported variable 'match' has or is using name '_' from external module "/Users/oliverash/Development/unsplash/unsplash-web/node_modules/@unsplash/sum-types/dist/types/index" but cannot be named.ts(4023)
  match,
  // Exported variable 'matchW' has or is using name '_' from external module "/Users/oliverash/Development/unsplash/unsplash-web/node_modules/@unsplash/sum-types/dist/types/index" but cannot be named.ts(4023)
  matchW,
} = Sum.create<Mode>();