You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update extension type augmentations to be more strict (#4003)
Closes#3694.
I went for the simplest answer here, since I don't see a motivating use case for anything more complex.
- The "original" extension type declaration _must_ include the representation type.
- Augmentations of extension types _must not_ include the representation type.
There is a TODO for updating the grammar, I think the simplest option is to make the representation type optional for both regular extension type declarations and augmenting ones, and have the error introduced at a later stage. This would have better behavior for tooling so that the file can still be parsed (ie: the formatter can still format in the face of this error). But, that is just a suggestion and I don't feel strongly if we would prefer to make the grammar more complex and have special rules for each.
0 commit comments