. , Duplicate Identifier. , , :)
window.console =
{
info: (message?: any, ...optionalParams: any[]) =>
{
// ...
},
profile: (reportName?: string) =>
{
// ...
},
assert: (test?: boolean, message?: string, ...optionalParams: any[]) =>
{
// ...
},
msIsIndependentlyComposed: (element: Element) =>
{
return false;
},
clear: () =>
{
// ...
},
dir: (value?: any, ...optionalParams: any[]) =>
{
// ...
},
warn: (message?: any, ...optionalParams: any[]) =>
{
// ...
},
error: (message?: any, ...optionalParams: any[]) =>
{
// ...
},
log: (message?: any, ...optionalParams: any[]) =>
{
// ...
},
profileEnd: () =>
{
// ...
},
count: (countTitle?: string) =>
{
// ...
},
groupEnd: () =>
{
// ...
},
time: (timerName?: string) =>
{
// ...
},
timeEnd: (timerName?: string) =>
{
// ...
},
trace: () =>
{
// ...
},
group: (groupTitle?: string) =>
{
// ...
},
dirxml: (value: any) =>
{
// ...
},
debug: (message?: string, ...optionalParams: any[]) =>
{
// ...
},
groupCollapsed: (groupTitle?: string) =>
{
// ...
},
select: (element: Element) =>
{
// ...
},
};
, TypeScript .
var x: any =
{
log: (msg) =>
{
}
};
window.console = <Console>x;