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:
@ -1,7 +1,7 @@
|
||||
import {describe, ddescribe, it, iit, xit, xdescribe, expect, beforeEach} from 'test_lib/test_lib';
|
||||
import {bootstrap, appDocumentToken, appElementToken, documentDependentBindings}
|
||||
from 'core/application';
|
||||
import {Component} from 'core/annotations/component';
|
||||
import {Component} from 'core/annotations/annotations';
|
||||
import {DOM} from 'facade/dom';
|
||||
import {ListWrapper} from 'facade/collection';
|
||||
import {PromiseWrapper} from 'facade/async';
|
||||
@ -16,6 +16,7 @@ import {TemplateConfig} from 'core/annotations/template_config';
|
||||
})
|
||||
})
|
||||
class HelloRootCmp {
|
||||
greeting:string;
|
||||
constructor() {
|
||||
this.greeting = 'hello';
|
||||
}
|
||||
@ -29,6 +30,7 @@ class HelloRootCmp {
|
||||
})
|
||||
})
|
||||
class HelloRootCmp2 {
|
||||
greeting:string;
|
||||
constructor() {
|
||||
this.greeting = 'hello';
|
||||
}
|
||||
|
Reference in New Issue
Block a user