fix(build): add missing return types now enforced by linter

This commit is contained in:
Alex Eagle
2015-06-26 11:10:52 -07:00
parent bc585f2724
commit 44891996b5
61 changed files with 467 additions and 400 deletions

View File

@ -72,7 +72,7 @@ class StarSegment {
var paramMatcher = RegExpWrapper.create("^:([^\/]+)$");
var wildcardMatcher = RegExpWrapper.create("^\\*([^\/]+)$");
function parsePathString(route: string) {
function parsePathString(route: string): StringMap<string, any> {
// normalize route as not starting with a "/". Recognition will
// also normalize.
if (StringWrapper.startsWith(route, "/")) {
@ -117,8 +117,10 @@ function parsePathString(route: string) {
specificity += 100 * (100 - i);
}
}
return {segments: results, specificity};
var result = StringMapWrapper.create();
StringMapWrapper.set(result, 'segments', results);
StringMapWrapper.set(result, 'specificity', specificity);
return result;
}
function splitBySlash(url: string): List<string> {

View File

@ -106,7 +106,7 @@ export class RouteRegistry {
ListWrapper.map(possibleMatches, (candidate) => this._completeRouteMatch(candidate));
return PromiseWrapper.all(matchPromises)
.then((solutions) => {
.then((solutions: List<Instruction>) => {
// remove nulls
var fullSolutions = ListWrapper.filter(solutions, (solution) => isPresent(solution));