chore(typings): remove StringMap
This was a poorly typed attempt to mimic TypeScript's index signatures, which we can use instead. This eliminates a very strange type that we were exposing to users, but not re-exporting through our public API. Fixes #4483
This commit is contained in:
@ -18,7 +18,7 @@ import {RegExpWrapper, print, isPresent} from 'angular2/src/core/facade/lang';
|
||||
/**
|
||||
* Custom validator.
|
||||
*/
|
||||
function creditCardValidator(c): StringMap<string, boolean> {
|
||||
function creditCardValidator(c): {[key: string]: boolean} {
|
||||
if (isPresent(c.value) && RegExpWrapper.test(/^\d{16}$/g, c.value)) {
|
||||
return null;
|
||||
} else {
|
||||
|
@ -35,7 +35,7 @@ class CheckoutModel {
|
||||
/**
|
||||
* Custom validator.
|
||||
*/
|
||||
function creditCardValidator(c): StringMap<string, boolean> {
|
||||
function creditCardValidator(c): {[key: string]: boolean} {
|
||||
if (isPresent(c.value) && RegExpWrapper.test(/^\d{16}$/g, c.value)) {
|
||||
return null;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user