{%- macro commentBlock(doc, level) -%}
{%- if doc.content | trim %}
{% if level > 1 %}{$ '/**' | indent(level-1, true) | replace(r/\n$/, "") $}{% else %}/**{% endif %}
{$ doc.content | trim | replace(r/^/gm, "* ") | indent(level, true) | replace(r/\n$/, "") $}
{$ '*/' | indent(level, true) | replace(r/\n$/, "") $}{% endif -%}
{%- endmacro -%}
// Type definitions for Angular v{$ versionInfo.currentVersion.full $}
// Project: http://angular.io/
// Definitions by: angular team
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// ***********************************************************
// This file is generated by the Angular build process.
// Please do not create manual edits or send pull requests
// modifying this file.
// ***********************************************************
// Angular depends transitively on these libraries.
// If you don't have them installed you can run
// $ tsd query es6-promise rx rx-lite --action install --save
///
///
interface List extends Array {}
interface Map {}
interface StringMap extends Map {}
interface Type {}
declare module "angular2/angular2" {
type SetterFn = typeof Function;
type int = number;
// See https://github.com/Microsoft/TypeScript/issues/1168
class BaseException /* extends Error */ {
message;
stack;
toString(): string;
}
}
{% for module in doc.modules %}
{$ commentBlock(module, 1) $}
declare module "{$ module.id $}" {
{%- for export in module.exports -%}
{%- if export.content -%}
{$ commentBlock(export, 3) $}
{%- endif %}
{$ export.docType $} {$ export.name $}{$ export.typeParams $}{$ export.heritage $}
{%- if export.docType == 'class' or export.docType == 'interface' %} {
{%- for member in export.members -%}
{$ commentBlock(member, 5) $}
{$ member.name $}
{%- if member.parameters %}({% for param in member.parameters %}{$ param $}{% if not loop.last %}, {% endif %}{% endfor %}){%- endif %}
{%- if member.returnType %}: {$ member.returnType $}{% endif -%}
;
{%- endfor %}
}
{%- else -%}
{% if export.parameters %}({% for param in export.parameters %}{$ param $}{% if not loop.last %}, {% endif %}{% endfor %}){%- endif %}
{%- if export.returnType %} : {$ export.returnType $} {% endif -%}
;
{%- endif %}
{% endfor %}
}
{% endfor %}