What modification need to be made to the jquery plugin boilerplate to compile in typescript?-Collection of common programming errors

Make undefined optional:

// the semi-colon before function invocation is a safety net against concatenated
// scripts and/or other plugins which may not be closed properly.
; (function ($ : any, window, document, undefined?) {

// undefined is used here as the undefined global variable in ECMAScript 3 is
// mutable (ie. it can be changed by someone else). undefined isn't really being
// passed in so we can ensure the value of it is truly undefined. In ES5, undefined
// can no longer be modified.

This will allow the template to compile since undefined is not passed into the function.

Originally posted 2013-11-09 18:41:56.