Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed process type in TypeScript template. #7796

Merged
merged 1 commit into from
Oct 10, 2019
Merged

Fixed process type in TypeScript template. #7796

merged 1 commit into from
Oct 10, 2019

Conversation

fuszenecker
Copy link
Contributor

Hi,

Please run the following commands in order to test my changes:

  • npx create-react-app my-react-app-01 --typescript
  • cd my-react-app-01
  • npm start

Expected result: no more compilation error appears.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@mrmckeb
Copy link
Contributor

mrmckeb commented Oct 9, 2019

Hi @fuszenecker, was this causing you an error?

I'm not a huge fan of this approach, as it's confusing for people... if this is an error, please let me know. It would be better to use the globals file for this, I feel.

@mrmckeb mrmckeb self-assigned this Oct 9, 2019
@@ -29,7 +29,7 @@ export function register(config?: Config) {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(
(process as { env: { [key: string]: string } }).env.PUBLIC_URL,
process.env.PUBLIC_URL,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The exact type of process is known, just as in line 29.

@mrmckeb
Copy link
Contributor

mrmckeb commented Oct 10, 2019

Sorry, that makes 100% sense @fuszenecker - I was reviewing from my phone and somehow thought this change was the opposite.

@mrmckeb mrmckeb merged commit 9161ba8 into facebook:master Oct 10, 2019
@lock lock bot locked and limited conversation to collaborators Oct 15, 2019
@ianschmitz ianschmitz added this to the 3.3 milestone Nov 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants