Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

fix: Fix Compile Errors #213

Merged
merged 2 commits into from
Aug 13, 2019
Merged

fix: Fix Compile Errors #213

merged 2 commits into from
Aug 13, 2019

Conversation

kevinvangelder
Copy link
Member

Fixes #154

@@ -11,7 +11,8 @@
"noImplicitThis": true,
"noUnusedLocals": true,
"sourceMap": true,
"target": "es2015"
"target": "es2015",
"lib": ["es6"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should probably just make this "lib": ["esNext"]. I know we have a bunch of projects that use newer features.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kevinvangelder Want to update this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bryanstearns Do you think this is a good idea, or should we hold off on this?

Copy link
Member

@bryanstearns bryanstearns Aug 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not an expert in cutting edge Javascript but since I play one on TV, my preference is to avoid using esNext in real projects since its definition changes over time, and "proposed" features' definitions sometimes change before they're accepted.

I'd have no problem changing to the latest specific version, like "lib": ["es2018"], though; this gives us const { x, ...rest} = y spreading in assignments, which is the latest future-y thing I've needed recently.

Copy link
Member

@bryanstearns bryanstearns Aug 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: react-native init foo --template=typescript sets target to "esnext" and lib to ["es6"]. This confuses me - it seems to mean "let me use es6 / es2015 syntax in my code, but assume that the javascript engine supports the latest proposed features" ¯\(ツ)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamonholmgren I've tested this both as-is and with this change, and both are good!

Suggested change
"lib": ["es6"]
"lib": ["es2018"]

@jamonholmgren
Copy link
Member

Going to wait for #227 to be merged before merging this one.

@jamonholmgren jamonholmgren merged commit b530eee into master Aug 13, 2019
@jamonholmgren jamonholmgren deleted the fix/compile-errors branch August 13, 2019 21:47
infinitered-circleci pushed a commit that referenced this pull request Aug 14, 2019
## [4.6.1](v4.6.0...v4.6.1) (2019-08-14)

### Bug Fixes

* 📦Bump detox to 14.0.1 ([#233](#233) by [@rdewolff](https://github.com/rdewolff)) ([19036df](19036df))
* Addresses storybook dependency and pod install issues ([#238](#238) by [@bryanstearns](https://github.com/bryanstearns)) ([d88d60e](d88d60e))
* Update to use es6 lib in tsconfig ([#213](#213) by [@kevinvangelder](https://github.com/kevinvangelder)) ([b530eee](b530eee))
@infinitered-circleci
Copy link

🎉 This PR is included in version 4.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yarn compile --> errors in node_modules folder
6 participants