fix(typings): repair broken type-checking for StringMap

Note that the previous type of StringMap was overly permissive and didn't catch errors.
Also we have to explicitly type empty objects, which is explained here:
https://github.com/Microsoft/TypeScript/issues/5089

Closes #4487
This commit is contained in:
Alex Eagle
2015-10-03 01:09:42 +00:00
committed by Alex Eagle
parent 7c4199cd1c
commit 208f3d4c65
16 changed files with 36 additions and 36 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ var defaultLocale: string = 'en-US';
@Pipe({name: 'date'})
@Injectable()
export class DatePipe implements PipeTransform {
static _ALIASES = {
static _ALIASES: {[key: string]: String} = {
'medium': 'yMMMdjms',
'short': 'yMdjm',
'fullDate': 'yMMMMEEEEd',
+1 -1
View File
@@ -14,7 +14,7 @@ import * as cd from 'angular2/src/core/change_detection/pipes';
export class ProtoPipes {
static fromBindings(bindings: PipeBinding[]): ProtoPipes {
var config = {};
var config: {[key: string]: PipeBinding} = {};
bindings.forEach(b => config[b.name] = b);
return new ProtoPipes(config);
}