
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’; } } ```
26 lines
635 B
JavaScript
26 lines
635 B
JavaScript
import {ProtoRecordRange, RecordRange} from './record_range';
|
|
import {ProtoRecord, Record} from './record';
|
|
import {FIELD, int, isPresent} from 'facade/lang';
|
|
|
|
export * from './record';
|
|
export * from './record_range'
|
|
|
|
export class ChangeDetector {
|
|
_rootRecordRange:RecordRange;
|
|
constructor(recordRange:RecordRange) {
|
|
this._rootRecordRange = recordRange;
|
|
}
|
|
|
|
detectChanges():int {
|
|
var count:int = 0;
|
|
for (var record = this._rootRecordRange.findFirstEnabledRecord();
|
|
isPresent(record);
|
|
record = record.nextEnabled) {
|
|
if (record.check()) {
|
|
count++;
|
|
}
|
|
}
|
|
return count;
|
|
}
|
|
}
|