interface String {
foo(): number;
}
String.foo= function() {
return 0;
}
String.prototype.foo= function() {
return 0;
}
declare global {
interface String {
foo(): number;
}
}
String.prototype.foo = function () {
return 0;
};