Conversation
…n and using union type in BRS mode
|
Accomplishes #1330 |
|
Hey there! I just built a new temporary npm package based on 5e648aa. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-1.0.0-alpha.49-intersection-type.20260120154200.tgz |
TwitchBronBron
left a comment
There was a problem hiding this comment.
Just a few small things, but overall this looks great!
| } | ||
| } | ||
| if (this.checkAny(TokenKind.And, TokenKind.Or)) { | ||
| this.warnIfNotBrighterScriptMode('custom types'); |
There was a problem hiding this comment.
Is there a better name than custom types? I know this is configurable, but feels like it would better to say something like intersection or union?
|
Hey there! I just built a new temporary npm package based on d277935. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-1.0.0-alpha.49-intersection-type.20260120174746.tgz |
Co-authored-by: Bronley Plumb <bronley@gmail.com>
|
Hey there! I just built a new temporary npm package based on 92a7755. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-1.0.0-alpha.49-intersection-type.20260120180333.tgz |
|
Hey there! I just built a new temporary npm package based on db1138c. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-1.0.0-alpha.49-intersection-type.20260122131443.tgz |
Adds
IntersectionTypemodelled after TypeScript's intersection typesIntersectionType<type> and <type>(type1 or type2) and (type3 or type4))type foo = myType1 or myType2 and myType3 or myType4=>myType1 or (myType2 and myType3) or myType4type MyKlassAA = MyKlass and roAssociativeArrayworks properly