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
Still valid, but should have a completely different meaning now. In the first, we have a type alias, while in the second, we have a lone identifier and a declaration.
Here's actually a few contexts where we do the wrong thing:
type aliases (see the example above)
namespaces/internal modules:
namespace// this is the identifier 'namespace'm// this is the identifier 'm'{}// this is a block body
declared modules
declare// this is the identifier 'declare'module// this is the identifier 'module'"my external module"// this is just a string{}// this is a block body
The text was updated successfully, but these errors were encountered:
DanielRosenwasser
changed the title
Type aliases override ASI rules
Legal JS is interpreted incorrectly in the presence of the 'type' keyword
May 2, 2015
DanielRosenwasser
changed the title
Legal JS is interpreted incorrectly in the presence of the 'type' keyword
Legal JS is interpreted incorrectly in the presence of certain keywords
May 2, 2015
Take the following code.
Now add a newline between
type Foo
:Still valid, but should have a completely different meaning now. In the first, we have a type alias, while in the second, we have a lone identifier and a declaration.
Here's actually a few contexts where we do the wrong thing:
The text was updated successfully, but these errors were encountered: