I\'m writing a grunt task in TypeScript. I\'m trying to translate something I already have in JavaScript.
So, when grunt runs a task, it runs a function. When it ru
How do I tell TypeScript to consider this to be a different type
You can do that by declaring a this
parameter. For your use case I've added this: {files:any[]}
:
grunt.registerMultiTask('clean', function(this: {files:any[]}) {
this.files.forEach(function(f) { Delete(f); });
});