\ allows you to specify a type that is a union with things.
For example the divide : (top: Number, bottom: Number \ 0) => Number function.
This is the inverse of | and is useful when thinking of types as sets.
+1, this is helpful for thinking about types as sets of properties. @Raynos can you document where the syntax is from in this thread? I'm neutral on the proposed syntax. I have a goal of having jsig syntax "look" as familiar as possible to JavaScript programmers, but there's not an existing concept that maps exactly. | comes from JavaScript bitwise or.
issue from #28
+1, this is helpful for thinking about types as sets of properties. @Raynos can you document where the syntax is from in this thread? I'm neutral on the proposed syntax. I have a goal of having jsig syntax "look" as familiar as possible to JavaScript programmers, but there's not an existing concept that maps exactly.
|
comes from JavaScript bitwise or.