Use lib: es5 to prevent IE 11 breaks#8414
Conversation
| "preserveConstEnums": true, | ||
| "lib": ["es2017", "dom"], | ||
| "skipLibCheck": true, | ||
| "lib": ["es5", "es2015.promise", "dom"], |
There was a problem hiding this comment.
@Raghurk I noticed there are several components in dashboard which use Promise. Do you require all consumers to provide a Promise polyfill (for IE 11 support)?
| private _contentContainer = React.createRef<HTMLDivElement>(); | ||
| private _subscribers: Set<Function>; | ||
| private _stickies: Set<Sticky>; | ||
| private _subscribers: Function[]; |
There was a problem hiding this comment.
Switched Set to arrays here--more verbose but should hopefully have the same behavior
packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.base.tsx
Show resolved
Hide resolved
kenotron
left a comment
There was a problem hiding this comment.
Thanks for doing this work!
| private _contentContainer = React.createRef<HTMLDivElement>(); | ||
| private _subscribers: Set<Function>; | ||
| private _stickies: Set<Sticky>; | ||
| private _subscribers: Function[]; |
|
needs rush change :( |
packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.base.tsx
Show resolved
Hide resolved
|
Planning to merge this EOD today. If anyone who hasn't reviewed wants to take a look before I merge, please do so now (or leave a comment asking me to wait). |
|
@ecraig12345 Nice work!!! |
|
Waiting to merge until I can implement David's suggestion about declaring IE11-compat versions of Set and Map somewhere. (see #8421 (comment) ) |
|
Updated the PR to add a So this time I really do intend to merge EOD unless someone objects. |
|
Merged. If anyone prefers a different approach to the Set/Map typings, let me know and we can revisit the issue. |
|
🎉 Handy links: |
|
🎉 Handy links: |
|
🎉 Handy links: |
|
🎉 Handy links: |
Pull request checklist
$ npm run changeDescription of changes
Currently we rely on code reviews to prevent ES6 methods and objects, which aren't supported in IE 11, from slipping into our code. Switching all projects which run in the browser to use
"lib": ["es5"](and possibly other relevant libs) in tsconfig.json will prevent these issues.Related changes:
"skipLibCheck": trueto tsconfig.json for projects which have dependencies whose typings use ES6 typesMicrosoft Reviewers: Open in CodeFlow