Skip to content

Commit b35ccb8

Browse files
committed
Accurate reflection of project.
1 parent 93e4ca7 commit b35ccb8

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# TypeScript Pseudo Dependent Typing Example with Mobx & React
1+
# TypeScript Union Types with Mobx & React
22

33
# Static Typing Stragegies
44
## Discriminated Unions
@@ -14,7 +14,7 @@ This information representation is fraught with opportunities for improper usage
1414

1515
The view model may protect itself from inappropriate access by throwing exceptions but this is terribly opaque and leads to the likelihood of run-time faults.
1616

17-
Run-time faults can be avoided altogether by employing Discriminated Unions to represent the valid states in such a way that meaning and usage are explicit and compiler verifiable.
17+
Run-time faults can be avoided altogether by employing Discriminated Unions (AKA Variants, Tagged Unions, Sum Types, Enumerations) to represent the valid states in such a way that meaning and usage are explicit and compiler verifiable.
1818

1919
Consider instead the Mobx code below
2020
```TypeScript
@@ -40,16 +40,6 @@ This can be modeled in a type-safe fashion with
4040
@computed doAwesomeThing: null | () => void;
4141
```
4242

43-
44-
## Dependent Typing - Cases By Values
45-
Object oriented code is no stranger to representing Cases with data types (the [State Pattern]( https://www.geeksforgeeks.org/state-design-pattern/) concerns itself explicitly with such concerns). A class is a "classificaiton" of thing; a set with members (object instances of the class).
46-
47-
An OO class in a nominal type system is
48-
* A named type where the name has semantic significance i.e. significance is related to the name.
49-
* A _structure_ of data with accompanying _behaviors_.
50-
51-
_Work in progress (i.e. more to come)_
52-
5343

5444
# Installation
5545
Initial run:

0 commit comments

Comments
 (0)