Skip to content

Backport v1 syntax changes#1034

Merged
TwitchBronBron merged 6 commits intomasterfrom
backport_v1_syntax_changes
Jan 30, 2024
Merged

Backport v1 syntax changes#1034
TwitchBronBron merged 6 commits intomasterfrom
backport_v1_syntax_changes

Conversation

@markwpearce
Copy link
Collaborator

@markwpearce markwpearce commented Jan 29, 2024

Allows:

  • typed array syntax
  • union type syntax
  • using built-in component/object/interface/event types
  • type cast syntax

This does NO additional validation. Use this syntax at your own risk.

In transpiled code:

  • Typed Arrays are converted to dynamic
  • Union types are converted to dynamic
  • Built in types are converted to object (just like Classes/interfaces)
  • Type casts are completely ignored and removed

Here are some examples:
image

@markwpearce markwpearce added this to the v1.0.0 milestone Jan 29, 2024
@markwpearce
Copy link
Collaborator Author

addresses: #1029

@TwitchBronBron TwitchBronBron added the create-package create a temporary npm package on every commit label Jan 29, 2024
@rokucommunity-bot
Copy link
Contributor

Hey there! I just built a new temporary npm package based on fe568ee. 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-0.65.18-backport-v1-syntax-changes.20240129152809.tgz

@TwitchBronBron
Copy link
Member

@markwpearce I just tested this out in our project, and I'm seeing a few small issues:

  1. return types have errors for the built-in types
    image
  2. names in extends sections have errors for known types.
    image

@rokucommunity-bot
Copy link
Contributor

Hey there! I just built a new temporary npm package based on d3465c2. 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-0.65.18-backport-v1-syntax-changes.20240129191739.tgz

Copy link
Member

@TwitchBronBron TwitchBronBron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks great! I tested on our internal project and have no issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

create-package create a temporary npm package on every commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants