diff --git a/docs/typescript-package/processors/readTypeScriptModules.js b/docs/typescript-package/processors/readTypeScriptModules.js index e50acd284d..7d314c9f07 100644 --- a/docs/typescript-package/processors/readTypeScriptModules.js +++ b/docs/typescript-package/processors/readTypeScriptModules.js @@ -290,7 +290,11 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo, ' at line ' + location.start.line); } return declaration.parameters.map(function(parameter) { - var paramText = getText(sourceFile, parameter.name); + var paramText = ''; + if (parameter.dotDotDotToken) { + paramText += '...'; + } + paramText += getText(sourceFile, parameter.name); if (parameter.questionToken || parameter.initializer) { paramText += '?'; } @@ -298,6 +302,9 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo, paramText += ':' + getType(sourceFile, parameter.type); } else { paramText += ': any'; + if (parameter.dotDotDotToken) { + paramText += '[]'; + } } return paramText.trim(); }); diff --git a/typing_spec/router_spec.ts b/typing_spec/router_spec.ts index a33d71dc06..9c1ef75e8d 100644 --- a/typing_spec/router_spec.ts +++ b/typing_spec/router_spec.ts @@ -11,6 +11,7 @@ import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_BINDINGS} from 'angular2/router'; template: '