Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !5557

Add typings for process.env

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/brunolemos/typescript-process-env into master 6 years ago
  • Overview 7
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: brunolemos

Babel doesn't support namespaces like export namespace App {}, but it does seem to support export declare namespace App {} or extending an existing namescape inside a declaration file (.d.ts) like we are doing here. Everything seems to work fine for this use case. (related)

image

Checking approval status

Merged by (Jul 25, 2025 2:47am UTC)

Loading

Activity


  • Administrator added CLA Signed label 6 years ago

    added CLA Signed label

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: Timer

    What about user defined REACT_APP_ vars? Can we fall back to { [key: string]: string | undefined }? Also, test is a valid env.

  • Administrator changed milestone to %2.1 6 years ago

    changed milestone to %2.1

  • Administrator added tag: bug fix label 6 years ago

    added tag: bug fix label

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: Timer

    Does this merge friendly if the user installs @types/node?

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: brunolemos

    What about user defined REACT_APP_ vars? Can we fall back to { [key: string]: string | undefined }? Also, test is a valid env.

    Added.

    Does this merge friendly if the user installs @types/node?

    Yes, just tested and worked as normal. It's because this code is extending an existing type, not creating or replacing completely

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: Timer

    I dunno what process.browser is for, we def don't support that. If we do, it's by accident and isn't covered by our semver guarantee. Can we remove that type please?

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: brunolemos

    @Timer removed. It's added by webpack, it will probably be always true with cra because there's no ssr support right

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: Timer

    @brunolemos ah, yeah, webpack is an implementation detail and we regularly bump major versions of webpack in patches. One day, we might not even use webpack -- so I don't want to rely on this.

  • Administrator changed title from Add typings for process.browser and process.env to Add typings for process.env 6 years ago

    changed title from Add typings for process.browser and process.env to Add typings for process.env

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Merged by: Timer at 2018-10-24 19:26:01 UTC

  • Administrator closed 6 years ago

    closed

  • Administrator added issue: typescript label 6 years ago

    added issue: typescript label

Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
Lock merge request
Unlocked
participants
Reference:
Source branch: github/fork/brunolemos/typescript-process-env

Menu

Explore Projects Groups Snippets