Using reserved keywords as methods on Classes/Instances in Typescript

If I use reserved keywords such as delete and continue as method names in Typescript classes, then I run into a problem with IE8.

For example:

class Foo {
    delete() : void {
        console.log('Delete called');
    }

    continue() : void {
        console.log('Continue called');
    }
}

generates the following javascript:

var Foo = (function () {
    function Foo() {
    }
    Foo.prototype.delete = function () {
        console.log('Delete called');
    };

    Foo.prototype.continue = function () {
        console.log('Continue called');
    };
    return Foo;
})();

However, this does not fly well with IE8. IE8 would prefer to have this instead:

var Bar = (function () {
    function Bar() {
    }
    Bar.prototype['delete'] = function () {
        console.log('Delete called');
    };

    Bar.prototype['continue'] = function () {
        console.log('Continue called');
    };
    return Bar;
})();

Is there a way I can retain the Typed goodness of Typescript while keeping my code IE8-well behaved?

In my particular case, I am trying to write a class which implements the ng.IHttpService interface and, hence, needs to have delete as an instance method.


ANSWERS:


class Foo {
    "delete"() : void {
        console.log('Delete called');
    }

    "continue"() : void {
        console.log('Continue called');
    }
}

translates to

var Foo = (function () {
    function Foo() {
    }
    Foo.prototype["delete"] = function () {
        console.log('Delete called');
    };

    Foo.prototype["continue"] = function () {
        console.log('Continue called');
    };
    return Foo;
})();

Note that I've never used TypeScript. I just went to their site, took a quick look at the specification PDF, found that string literals can be used, and tried it in the TypeScript playground.



 MORE:


 ? Passing array as arguments in TypeScript
 ? How can you enable NodeJS and ExpressJs into Typescript
 ? Generic interface declaration not working as-is on typescript 0.9.5
 ? Compiled JavaScript Files Not Appearing In Visual Studio Project
 ? Is there any difference in using overloads or optional parameters in TypeScript?
 ? The property 'jqGrid' does not exist on value of type 'JQuery'
 ? Trying to convert JQuery plugin to TypeScript
 ? Cannot extend angularjs controller in typescript
 ? Angular2 routing : redirectTo a relative url
 ? Angular 2 - Check current active route "name"