chore: Make field declarations explicit

This used to be valid code:

```
class Foo {
  constructor() {
    this.bar = ‘string’;
  }
}
```

This will now fail since ‘bar’ is not explicitly
defined as a field. We now have to write:

```
class Foo {
  bar:string; // << REQUIRED
  constructor() {
    this.bar = ‘string’;
  }
}
```
This commit is contained in:
Misko Hevery
2014-11-21 21:19:23 -08:00
committed by vsavkin
parent ab961b327e
commit 044625a098
69 changed files with 572 additions and 504 deletions

View File

@ -6,7 +6,7 @@ import {Compiler} from 'core/compiler/compiler';
import {ProtoView} from 'core/compiler/view';
import {Reflector} from 'core/compiler/reflector';
import {TemplateLoader} from 'core/compiler/template_loader';
import {Component} from 'core/annotations/component';
import {Component} from 'core/annotations/annotations';
import {TemplateConfig} from 'core/annotations/template_config';
import {CompileElement} from 'core/compiler/pipeline/compile_element';
import {CompileStep} from 'core/compiler/pipeline/compile_step'
@ -98,6 +98,7 @@ class MainComponent {}
class NestedComponent {}
class TestableCompiler extends Compiler {
steps:List;
constructor(templateLoader:TemplateLoader, reflector:Reflector, parser, closureMap, steps:List<CompileStep>) {
super(templateLoader, reflector, parser, closureMap);
this.steps = steps;
@ -108,6 +109,7 @@ class TestableCompiler extends Compiler {
}
class MockStep extends CompileStep {
processClosure:Function;
constructor(process) {
this.processClosure = process;
}