Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport v1 syntax changes #1034

Merged
merged 6 commits into from
Jan 30, 2024
Merged

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

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

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.

@TwitchBronBron TwitchBronBron merged commit ec0341b into master Jan 30, 2024
6 checks passed
@TwitchBronBron TwitchBronBron deleted the backport_v1_syntax_changes branch January 30, 2024 14:56
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