Take the following code.
vartype;varstring;varFoo;typeFoo=string;
Now add a newline between type Foo:
vartype;varstring;varFoo;typeFoo=string;
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 bodydeclare// this is the identifier 'declare'module// this is the identifier 'module'"my external module"// this is just a string{}// this is a block body
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: