From a46df6f829c6132ef5c97893f2def32c0baf2c50 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 9 Jun 2015 16:51:40 +0200 Subject: [PATCH] refactor(StringWrapper): add missing types --- modules/angular2/src/facade/lang.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/angular2/src/facade/lang.ts b/modules/angular2/src/facade/lang.ts index 607f51d923..e5fad871eb 100644 --- a/modules/angular2/src/facade/lang.ts +++ b/modules/angular2/src/facade/lang.ts @@ -98,9 +98,9 @@ export function stringify(token): string { export class StringWrapper { static fromCharCode(code: int): string { return String.fromCharCode(code); } - static charCodeAt(s: string, index: int) { return s.charCodeAt(index); } + static charCodeAt(s: string, index: int): number { return s.charCodeAt(index); } - static split(s: string, regExp) { return s.split(regExp); } + static split(s: string, regExp): List { return s.split(regExp); } static equals(s: string, s2: string): boolean { return s === s2; } @@ -116,9 +116,9 @@ export class StringWrapper { static toLowerCase(s: string): string { return s.toLowerCase(); } - static startsWith(s: string, start: string) { return s.startsWith(start); } + static startsWith(s: string, start: string): boolean { return s.startsWith(start); } - static substring(s: string, start: int, end: int = null) { + static substring(s: string, start: int, end: int = null): string { return s.substring(start, end === null ? undefined : end); } @@ -139,7 +139,7 @@ export class StringWrapper { export class StringJoiner { constructor(public parts = []) {} - add(part: string) { this.parts.push(part); } + add(part: string): void { this.parts.push(part); } toString(): string { return this.parts.join(""); } }