Skip to content

Go reconsider struct code generation #2564

Closed
@RomainMuller

Description

@RomainMuller

🐛 Bug Report

The current implementation of structs does not embed base types, means adding a property to a parent struct (even if optional) is not a breaking change in TS, but is source-breaking in Go, which is bad.

Embedding structs has consequences on the initialisation pattern (struct value literals are coupled to their embedding structure), and interfaces can help alleviate this problem, but this is not perfect.


Relevant links:

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.effort/mediumMedium work item – a couple days of effortp1

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions