Skip to content

Conversation

@richard-viney
Copy link
Contributor

In v1.13.0 the following Gleam code

pub type ValueRepresentation {
  UniversalResourceIdentifier
}

generates the following invalid TypeScript definition

export function ValueRepresentation$UniversalResourceIdentifier(
  ,
): ValueRepresentation$;

The comma isn't valid there and gives the error Parameter declaration expected. from tsc.

This issue occurs when the variant constructor function name is long, and it takes no arguments.

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Thank you! Left a note inline about approaching this another way

@lpil lpil marked this pull request as draft October 24, 2025 11:15
@richard-viney richard-viney force-pushed the fix-invalid-typescript-definitions branch from 06d7b9f to ceab001 Compare October 24, 2025 11:50
Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

The tests are missing!

@richard-viney richard-viney force-pushed the fix-invalid-typescript-definitions branch 2 times, most recently from c502635 to a9e8207 Compare October 24, 2025 12:04
@richard-viney
Copy link
Contributor Author

The tests are missing!

Not any more!

@richard-viney richard-viney marked this pull request as ready for review October 24, 2025 12:04
@richard-viney richard-viney force-pushed the fix-invalid-typescript-definitions branch from a9e8207 to 56255f7 Compare October 31, 2025 09:43
@richard-viney richard-viney force-pushed the fix-invalid-typescript-definitions branch from 56255f7 to 5a74b5b Compare November 5, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants