Opened 3 years ago

Closed 2 years ago

#18788 closed defect (fixed)

Strict mode compatibility

Reported by: dylan Owned by: Dylan Schiemann <dylan@…>
Priority: undecided Milestone: 1.14
Component: Core Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by dylan)

It was pointed out that getting declared classes to be strict mode compatible is perhaps as simple as making this change throughout:

// strict mode incompatible
foo: function() {
    this.inherited(arguments);
}

// strict mode compatible
foo: function foo() {
    this.inherited({callee: foo}, arguments);
}

I'll consider this change for 1.12 if it really is that simple, though the number of places where this might need to change is extensive.

The main motivation is that TypeScript? 1.8 now always emits strict mode, which makes typings for using Dojo nearly useless. See https://github.com/Microsoft/TypeScript/issues/3576 and https://github.com/Microsoft/TypeScript/issues/6819 . This last point is no longer relative as TS allows you to emit modules that are not in strict mode.

Change History (3)

comment:1 Changed 3 years ago by dylan

Description: modified (diff)
Milestone: 1.121.14

comment:2 Changed 2 years ago by mssskhalsa

Adding strict mode compatibility requires an API change, but it's optional - old code doesn't need to be updated.

https://github.com/dojo/dojo/pull/249

comment:3 Changed 2 years ago by Dylan Schiemann <dylan@…>

Owner: set to Dylan Schiemann <dylan@…>
Resolution: fixed
Status: newclosed

In b1fc2a2/dojo:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.