Permit type alias declarations inside a class
I normally want my class declaration to be the first thing in my file: ``` typescript module foo { /** My foo class */ export class MyFoo { } } ``` So when I want to declare an alias, I don't like the fact that my class has been pushed down further: ``` typescript module foo { type foobar = foo.bar.baz.FooBar; /** My foo class */ export class MyFoo { } } ``` I suggest the following be permitted: ``` typescript module foo { /** My foo class */ export class MyFoo { type foobar = foo.bar.baz.FooBar; } } ``` Since `type foobar` is just a compile-time construct, and if people want to write it that way, then they should be permitted to do so. Note that the type `foobar` is private to the class. It should not be permissible to export `foobar`.
Posted by NoelAbrahams on Feb 12, 2016, 10:04 PM
Tags
Related issues
- This is my biggest problem with agents, they constantly defensively code for cases that have no chance of happening and in most cases a p...
- I wish there was something like LEAN for biology.
- The issue is really the extreme difficulty of programming them, especially for anything sequential (rather than combinatorial).
- I probably could have beared with it if it was only limited to programming, but it showing up in creative fields has made me feel all sor...
- I hate that I'm in deep enough to know what you mean.
- The biggest problem with “AI” is that big corps are shoving it down our throats.
Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments
reliability (Other)
This is my biggest problem with agents, they constantly defensively code for cases that have no chance of happening and in most cases a p...
NewI wish there was something like LEAN for biology.
NewThe issue is really the extreme difficulty of programming them, especially for anything sequential (rather than combinatorial).
I probably could have beared with it if it was only limited to programming, but it showing up in creative fields has made me feel all sor...
I hate that I'm in deep enough to know what you mean.
The biggest problem with “AI” is that big corps are shoving it down our throats.
in the middel of a coding session with 5.6 sol.
[Hero Run] 535B-A23B on 18T tokens
Permit type alias declarations inside a class
I normally want my class declaration to be the first thing in my file: ``` typescript module foo { /** My foo class */ export class MyFoo { } } ``` So when I want to declare an alias, I don't like the fact that my class has been pushed down further: ``` typescript module foo { type foobar = foo.bar.baz.FooBar; /** My foo class */ export class MyFoo { } } ``` I suggest the following be permitted: ``` typescript module foo { /** My foo class */ export class MyFoo { type foobar = foo.bar.baz.FooBar; } } ``` Since `type foobar` is just a compile-time construct, and if people want to write it that way, then they should be permitted to do so. Note that the type `foobar` is private to the class. It should not be permissible to export `foobar`.
Comments (0)
No comments yet. Start the discussion.