Skip to content

[PT-BR] explainFiles.md #45

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

Merged
merged 2 commits into from
Feb 25, 2021
Merged

[PT-BR] explainFiles.md #45

merged 2 commits into from
Feb 25, 2021

Conversation

gustavofabro
Copy link
Contributor

@github-actions
Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @khaosdoctor and @danilofuchs - if they write a comment saying "LGTM" then it will be merged.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2021

Translation of explainFiles.md

display: "explainFiles"

oneline: "Prints the files read during compilation along with the reason for their inclusion."

Prints the names of files that TypeScript recognizes as part of your project and the reason why they are parts of the build.

For example, in this project with only a simple file index.ts

example
├── index.ts
├── package.json
└── tsconfig.json

Using a tsconfig.json that has explainFiles set to true:

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "explainFiles": true
  }
}

Running TypeScript in this folder will have an output similar to this:

❯ tsc
node_modules/typescript/lib/lib.d.ts
  Default library for target 'es5'
node_modules/typescript/lib/lib.es5.d.ts
  Library referenced via 'es5' from file 'node_modules/typescript/lib/lib.d.ts'
node_modules/typescript/lib/lib.dom.d.ts
  Library referenced via 'dom' from file 'node_modules/typescript/lib/lib.d.ts'
node_modules/typescript/lib/lib.webworker.importscripts.d.ts
  Library referenced via 'webworker.importscripts' from file 'node_modules/typescript/lib/lib.d.ts'
node_modules/typescript/lib/lib.scripthost.d.ts
  Library referenced via 'scripthost' from file 'node_modules/typescript/lib/lib.d.ts'
index.ts
  Matched by include pattern '**/*' in 'tsconfig.json'

The output above shows:

  • The initial lib.d.ts search based on target, and the file chain .d.ts that are referenced
  • The file index.ts located through the standard pattern of include

This option is intended to debug how a file has become part of your build.

Generated by 🚫 dangerJS against 095ec24

Comment on lines 49 to 50
- The initial lib.d.ts lookup based on [`target`](#include), and the chain of `.d.ts` files which are referenced
- The `index.ts` file located via the default pattern of [`include`](#include)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you missed this bit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, translated now!

@khaosdoctor
Copy link
Contributor

LGTM

@github-actions github-actions bot merged commit a7b8115 into microsoft:main Feb 25, 2021
@github-actions
Copy link
Contributor

Merging because @khaosdoctor is a code-owner of all the changes - thanks!

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

Successfully merging this pull request may close these issues.

3 participants