├── .github ├── CODEOWNERS └── workflows │ ├── CI.yml │ ├── codeowners-merge.yml │ ├── post-localizations.yml │ └── weekly.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── LICENSE-CODE ├── README.md ├── SECURITY.md ├── attribution.json ├── dangerfile.ts ├── docs ├── documentation │ ├── fr │ │ ├── Nightly Builds.md │ │ ├── get-started │ │ │ ├── TS for JS Programmers.md │ │ │ ├── TS for OOPers.md │ │ │ └── TS for the New Programmer.md │ │ ├── handbook-v2 │ │ │ ├── Basics.md │ │ │ ├── Classes.md │ │ │ ├── Everyday Types.md │ │ │ ├── Modules.md │ │ │ ├── More on Functions.md │ │ │ ├── Narrowing.md │ │ │ ├── Object Types.md │ │ │ ├── The Handbook.md │ │ │ ├── Type Declarations.md │ │ │ ├── Type Manipulation │ │ │ │ ├── Conditional Types.md │ │ │ │ ├── Generics.md │ │ │ │ ├── Indexed Access Types.md │ │ │ │ ├── Keyof Type Operator.md │ │ │ │ ├── Mapped Types.md │ │ │ │ ├── Template Literal Types.md │ │ │ │ ├── Typeof Type Operator.md │ │ │ │ └── _Creating Types from Types.md │ │ │ └── Understanding Errors.md │ │ └── tutorials │ │ │ ├── Angular.md │ │ │ └── React.md │ ├── id │ │ ├── Nightly Builds.md │ │ ├── javascript │ │ │ ├── Creating DTS files From JS.md │ │ │ ├── Intro to JS with TS.md │ │ │ └── JSDoc Reference.md │ │ ├── project-config │ │ │ └── Configuring Watch.md │ │ ├── reference │ │ │ ├── Decorators.md │ │ │ ├── Iterators and Generators.md │ │ │ ├── JSX.md │ │ │ ├── Mixins.md │ │ │ └── Symbols.md │ │ └── tutorials │ │ │ ├── Babel with TypeScript.md │ │ │ ├── DOM Manipulation.md │ │ │ ├── React.md │ │ │ └── TypeScript Tooling in 5 minutes.md │ ├── ja │ │ ├── Nightly Builds.md │ │ └── javascript │ │ │ ├── Creating DTS files From JS.md │ │ │ ├── Intro to JS with TS.md │ │ │ ├── JSDoc Reference.md │ │ │ └── Type Checking JavaScript Files.md │ ├── ko │ │ ├── Nightly Builds.md │ │ ├── declaration-files │ │ │ ├── By Example.md │ │ │ ├── Consumption.md │ │ │ ├── Deep Dive.md │ │ │ ├── Do's and Don'ts.md │ │ │ ├── Introduction.md │ │ │ ├── Library Structures.md │ │ │ ├── Publishing.md │ │ │ ├── Templates.md │ │ │ └── templates │ │ │ │ ├── module-class.d.ts.md │ │ │ │ └── module-function.d.ts.md │ │ ├── get-started │ │ │ ├── TS for Functional Programmers.md │ │ │ ├── TS for JS Programmers.md │ │ │ ├── TS for OOPers.md │ │ │ └── TS for the New Programmer.md │ │ ├── handbook-v2 │ │ │ ├── Basics.md │ │ │ ├── Everyday Types.md │ │ │ ├── More on Functions.md │ │ │ ├── The Handbook.md │ │ │ ├── Type Manipulation │ │ │ │ ├── Conditional Types.md │ │ │ │ ├── Generics.md │ │ │ │ ├── Indexed Access Types.md │ │ │ │ ├── Keyof Type Operator.md │ │ │ │ ├── Mapped Types.md │ │ │ │ └── Typeof Type Operator.md │ │ │ └── Understanding Errors.md │ │ ├── javascript │ │ │ ├── Creating DTS files From JS.md │ │ │ ├── Intro to JS with TS.md │ │ │ ├── JSDoc Reference.md │ │ │ └── Type Checking JavaScript Files.md │ │ ├── project-config │ │ │ ├── Compiler Options in MSBuild.md │ │ │ ├── Compiler Options.md │ │ │ ├── Configuring Watch.md │ │ │ ├── Integrating with Build Tools.md │ │ │ ├── Project References.md │ │ │ └── tsconfig.json.md │ │ ├── reference │ │ │ ├── Declaration Merging.md │ │ │ ├── Decorators.md │ │ │ ├── Enums.md │ │ │ ├── Iterators and Generators.md │ │ │ ├── JSX.md │ │ │ ├── Module Resolution.md │ │ │ ├── Modules.md │ │ │ ├── Namespaces and Modules.md │ │ │ ├── Namespaces.md │ │ │ ├── Symbols.md │ │ │ ├── Triple-Slash Directives.md │ │ │ ├── Type Compatibility.md │ │ │ ├── Type Inference.md │ │ │ ├── Utility Types.md │ │ │ └── Variable Declarations.md │ │ ├── release-notes │ │ │ ├── TypeScript 3.8.md │ │ │ ├── TypeScript 3.9.md │ │ │ ├── TypeScript 4.0.md │ │ │ └── TypeScript 4.9.md │ │ └── tutorials │ │ │ ├── ASP.NET Core.md │ │ │ ├── Babel with TypeScript.md │ │ │ ├── DOM Manipulation.md │ │ │ ├── Gulp.md │ │ │ ├── Migrating from JavaScript.md │ │ │ ├── React.md │ │ │ └── TypeScript Tooling in 5 minutes.md │ ├── pl │ │ ├── Nightly Builds.md │ │ └── handbook-v2 │ │ │ └── The Handbook.md │ ├── pt │ │ ├── Nightly Builds.md │ │ ├── declaration-files │ │ │ ├── By Example.md │ │ │ ├── Consumption.md │ │ │ ├── Deep Dive.md │ │ │ ├── Do's and Don'ts.md │ │ │ ├── Introduction.md │ │ │ └── templates │ │ │ │ └── global-modifying-module.d.ts.md │ │ ├── get-started │ │ │ ├── TS for Functional Programmers.md │ │ │ ├── TS for JS Programmers.md │ │ │ ├── TS for OOPers.md │ │ │ └── TS for the New Programmer.md │ │ ├── javascript │ │ │ ├── Creating DTS files From JS.md │ │ │ ├── Intro to JS with TS.md │ │ │ ├── JSDoc Reference.md │ │ │ └── Type Checking JavaScript Files.md │ │ ├── project-config │ │ │ ├── Configuring Watch.md │ │ │ ├── Project References.md │ │ │ └── tsconfig.json.md │ │ ├── reference │ │ │ ├── Declaration Merging.md │ │ │ ├── Decorators.md │ │ │ ├── Iterators and Generators.md │ │ │ ├── JSX.md │ │ │ ├── Mixins.md │ │ │ ├── Module Resolution.md │ │ │ ├── Modules.md │ │ │ ├── Namespaces and Modules.md │ │ │ ├── Namespaces.md │ │ │ ├── Symbols.md │ │ │ ├── Triple-Slash Directives.md │ │ │ ├── Type Compatibility.md │ │ │ ├── Type Inference.md │ │ │ ├── Utility Types.md │ │ │ └── Variable Declarations.md │ │ └── tutorials │ │ │ ├── Babel with TypeScript.md │ │ │ ├── DOM Manipulation.md │ │ │ ├── React.md │ │ │ └── TypeScript Tooling in 5 minutes.md │ ├── vo │ │ └── handbook-v1 │ │ │ └── Basic Types.md │ └── zh │ │ ├── Nightly Builds.md │ │ ├── get-started │ │ ├── TS for JS Programmers.md │ │ └── TS for the New Programmer.md │ │ ├── handbook-v2 │ │ ├── Basics.md │ │ ├── Everyday Types.md │ │ └── Type Manipulation │ │ │ └── Conditional Types.md │ │ └── project-config │ │ └── tsconfig.json.md ├── playground │ ├── es │ │ ├── JavaScript │ │ │ ├── External APIs │ │ │ │ ├── TypeScript with Deno.ts │ │ │ │ ├── TypeScript with Node.js │ │ │ │ └── TypeScript with Web.js │ │ │ ├── Functions with JavaScript │ │ │ │ ├── Function Chaining.ts │ │ │ │ └── Generic Functions.ts │ │ │ └── JavaScript Essentials │ │ │ │ ├── Hello World.ts │ │ │ │ └── Objects and Arrays.ts │ │ ├── TypeScript │ │ │ ├── Language │ │ │ │ ├── Soundness.ts │ │ │ │ ├── Structural Typing.ts │ │ │ │ ├── Type Guards.ts │ │ │ │ └── Type Widening and Narrowing.ts │ │ │ ├── Meta-Types │ │ │ │ ├── Conditional Types.ts │ │ │ │ ├── Discriminate Types.ts │ │ │ │ ├── Indexed Types.ts │ │ │ │ └── Mapped Types.ts │ │ │ ├── Primitives │ │ │ │ ├── Any.ts │ │ │ │ ├── Literals.ts │ │ │ │ ├── Union and Intersection Types.ts │ │ │ │ └── Unknown and Never.ts │ │ │ └── Type Primitives │ │ │ │ ├── Built-in Utility Types.ts │ │ │ │ ├── Nullable Types.ts │ │ │ │ └── Tuples.ts │ │ └── sections.json │ ├── fa │ │ ├── JavaScript │ │ │ ├── JavaScript Essentials │ │ │ │ └── Hello World.ts │ │ │ └── README.md │ │ └── sections.json │ ├── fr │ │ ├── 3-7 │ │ │ ├── Fixits │ │ │ │ ├── Big number literals.ts │ │ │ │ ├── Const to let.ts │ │ │ │ └── Infer From Usage Changes.ts │ │ │ └── Syntax and Messaging │ │ │ │ ├── Flattened Error Reporting.ts │ │ │ │ ├── Nullish Coalescing.ts │ │ │ │ └── Optional Chaining.ts │ │ └── sections.json │ ├── id │ │ ├── 3-7 │ │ │ ├── Fixits │ │ │ │ ├── Big number literals.ts │ │ │ │ ├── Const to let.ts │ │ │ │ └── Infer From Usage Changes.ts │ │ │ ├── Syntax and Messaging │ │ │ │ ├── Flattened Error Reporting.ts │ │ │ │ ├── Nullish Coalescing.ts │ │ │ │ └── Optional Chaining.ts │ │ │ └── Types and Code Flow │ │ │ │ ├── Assertion Functions.ts │ │ │ │ ├── Recursive Type References.ts │ │ │ │ └── Uncalled Function Checks.ts │ │ ├── 3-8 │ │ │ ├── Breaking Changes │ │ │ │ └── Checking Unions with Index Signatures.ts │ │ │ ├── JSDoc Improvements │ │ │ │ └── Accessibility Modifiers.js │ │ │ └── Syntax and Messaging │ │ │ │ ├── Export Modules From.ts │ │ │ │ ├── Private Class Fields.ts │ │ │ │ └── Type Imports.tsx │ │ ├── 4-0 │ │ │ ├── New Checks │ │ │ │ └── Class Constructor Code Flow.ts │ │ │ ├── New JS Features │ │ │ │ ├── JSDoc Deprecated.ts │ │ │ │ ├── Logical Operators and Assignment.ts │ │ │ │ └── Nullish Coalescing.ts │ │ │ └── New TS Features │ │ │ │ ├── Named Tuples.ts │ │ │ │ ├── Unknown in Catch.ts │ │ │ │ └── Variadic Tuples.ts │ │ ├── JavaScript │ │ │ ├── External APIs │ │ │ │ ├── TypeScript with Deno.ts │ │ │ │ ├── TypeScript with Node.js │ │ │ │ ├── TypeScript with React.tsx │ │ │ │ ├── TypeScript with Web.js │ │ │ │ └── TypeScript with WebGL.js │ │ │ ├── Functions with JavaScript │ │ │ │ ├── Function Chaining.ts │ │ │ │ ├── Generic Functions.ts │ │ │ │ └── Typing Functions.ts │ │ │ ├── Helping with JavaScript │ │ │ │ ├── Errors.ts │ │ │ │ └── Quick Fixes.ts │ │ │ ├── JavaScript Essentials │ │ │ │ ├── Code Flow.ts │ │ │ │ ├── Functions.ts │ │ │ │ ├── Hello World.ts │ │ │ │ └── Objects and Arrays.ts │ │ │ └── Modern JavaScript │ │ │ │ ├── Async Await.ts │ │ │ │ ├── Immutability.ts │ │ │ │ ├── Import Export.ts │ │ │ │ └── JSDoc Support.js │ │ └── sections.json │ ├── ja │ │ ├── 3-7 │ │ │ ├── Fixits │ │ │ │ ├── Big number literals.ts │ │ │ │ ├── Const to let.ts │ │ │ │ └── Infer From Usage Changes.ts │ │ │ ├── Syntax and Messaging │ │ │ │ ├── Flattened Error Reporting.ts │ │ │ │ ├── Nullish Coalescing.ts │ │ │ │ └── Optional Chaining.ts │ │ │ └── Types and Code Flow │ │ │ │ ├── Assertion Functions.ts │ │ │ │ ├── Recursive Type References.ts │ │ │ │ └── Uncalled Function Checks.ts │ │ ├── 3-8 │ │ │ ├── Breaking Changes │ │ │ │ └── Checking Unions with Index Signatures.ts │ │ │ ├── JSDoc Improvements │ │ │ │ └── Accessibility Modifiers.js │ │ │ └── Syntax and Messaging │ │ │ │ ├── Export Modules From.ts │ │ │ │ ├── Private Class Fields.ts │ │ │ │ └── Type Imports.tsx │ │ ├── 4-0 │ │ │ ├── New Checks │ │ │ │ └── Class Constructor Code Flow.ts │ │ │ ├── New JS Features │ │ │ │ ├── JSDoc Deprecated.ts │ │ │ │ ├── Logical Operators and Assignment.ts │ │ │ │ └── Nullish Coalescing.ts │ │ │ └── New TS Features │ │ │ │ ├── Named Tuples.ts │ │ │ │ ├── Unknown in Catch.ts │ │ │ │ └── Variadic Tuples.ts │ │ ├── 4-1 │ │ │ ├── New JS Features │ │ │ │ ├── New JSX Support.tsx │ │ │ │ └── See in JSDoc.ts │ │ │ └── Template Literals │ │ │ │ ├── Intro to Template Literals.ts │ │ │ │ ├── Mapped Types with Template Literals.ts │ │ │ │ └── String Manipulation with Template Literals.ts │ │ ├── JavaScript │ │ │ └── External APIs │ │ │ │ └── TypeScript with Deno.ts │ │ ├── TypeScript │ │ │ ├── Language Extensions │ │ │ │ ├── Enums.ts │ │ │ │ ├── Nominal Typing.ts │ │ │ │ └── Types vs Interfaces.ts │ │ │ ├── Meta-Types │ │ │ │ ├── Conditional Types.ts │ │ │ │ ├── Discriminate Types.ts │ │ │ │ ├── Indexed Types.ts │ │ │ │ └── Mapped Types.ts │ │ │ ├── Primitives │ │ │ │ ├── Any.ts │ │ │ │ ├── Literals.ts │ │ │ │ ├── Union and Intersection Types.ts │ │ │ │ └── Unknown and Never.ts │ │ │ └── Type Primitives │ │ │ │ ├── Built-in Utility Types.ts │ │ │ │ ├── Nullable Types.ts │ │ │ │ └── Tuples.ts │ │ └── sections.json │ ├── ko │ │ ├── 3-7 │ │ │ ├── Fixits │ │ │ │ ├── Big number literals.ts │ │ │ │ ├── Const to let.ts │ │ │ │ └── Infer From Usage Changes.ts │ │ │ ├── Syntax and Messaging │ │ │ │ ├── Flattened Error Reporting.ts │ │ │ │ └── Optional Chaining.ts │ │ │ └── Types and Code Flow │ │ │ │ ├── Assertion Functions.ts │ │ │ │ └── Uncalled Function Checks.ts │ │ ├── 3-8 │ │ │ ├── Breaking Changes │ │ │ │ └── Checking Unions with Index Signatures.ts │ │ │ └── Syntax and Messaging │ │ │ │ ├── Export Modules From.ts │ │ │ │ ├── Private Class Fields.ts │ │ │ │ └── Type Imports.tsx │ │ ├── 4-0 │ │ │ ├── New Checks │ │ │ │ └── Class Constructor Code Flow.ts │ │ │ ├── New JS Features │ │ │ │ ├── JSDoc Deprecated.ts │ │ │ │ └── Logical Operators and Assignment.ts │ │ │ └── New TS Features │ │ │ │ └── Unknown in Catch.ts │ │ ├── JavaScript │ │ │ ├── External APIs │ │ │ │ ├── TypeScript with Node.js │ │ │ │ ├── TypeScript with React.tsx │ │ │ │ └── TypeScript with Web.js │ │ │ ├── Functions with JavaScript │ │ │ │ ├── Function Chaining.ts │ │ │ │ ├── Generic Functions.ts │ │ │ │ └── Typing Functions.ts │ │ │ ├── Helping with JavaScript │ │ │ │ ├── Errors.ts │ │ │ │ └── Quick Fixes.ts │ │ │ ├── JavaScript Essentials │ │ │ │ ├── Code Flow.ts │ │ │ │ ├── Functions.ts │ │ │ │ ├── Hello World.ts │ │ │ │ └── Objects and Arrays.ts │ │ │ ├── Modern JavaScript │ │ │ │ ├── Async Await.ts │ │ │ │ ├── Immutability.ts │ │ │ │ └── Import Export.ts │ │ │ └── Working With Classes │ │ │ │ ├── Classes 101.ts │ │ │ │ ├── Generic Classes.ts │ │ │ │ └── Mixins.ts │ │ ├── Playground │ │ │ ├── Config │ │ │ │ └── JavaScript Playgrounds.js │ │ │ ├── Language │ │ │ │ └── Fixits.ts │ │ │ └── Tooling │ │ │ │ ├── Mobile Support.ts │ │ │ │ └── TypeScript Versions.ts │ │ ├── TypeScript │ │ │ ├── Language Extensions │ │ │ │ ├── Enums.ts │ │ │ │ ├── Nominal Typing.ts │ │ │ │ └── Types vs Interfaces.ts │ │ │ ├── Language │ │ │ │ ├── Structural Typing.ts │ │ │ │ └── Type Guards.ts │ │ │ ├── Meta-Types │ │ │ │ ├── Conditional Types.ts │ │ │ │ ├── Discriminate Types.ts │ │ │ │ ├── Indexed Types.ts │ │ │ │ └── Mapped Types.ts │ │ │ ├── Primitives │ │ │ │ ├── Any.ts │ │ │ │ ├── Literals.ts │ │ │ │ ├── Union and Intersection Types.ts │ │ │ │ └── Unknown and Never.ts │ │ │ └── Type Primitives │ │ │ │ ├── Built-in Utility Types.ts │ │ │ │ ├── Nullable Types.ts │ │ │ │ └── Tuples.ts │ │ └── sections.json │ ├── pt │ │ ├── 3-7 │ │ │ ├── Fixits │ │ │ │ ├── Big number literals.ts │ │ │ │ ├── Const to let.ts │ │ │ │ └── Infer From Usage Changes.ts │ │ │ ├── Syntax and Messaging │ │ │ │ ├── Flattened Error Reporting.ts │ │ │ │ ├── Nullish Coalescing.ts │ │ │ │ └── Optional Chaining.ts │ │ │ └── Types and Code Flow │ │ │ │ ├── Assertion Functions.ts │ │ │ │ ├── Recursive Type References.ts │ │ │ │ └── Uncalled Function Checks.ts │ │ ├── 3-8 │ │ │ ├── Breaking Changes │ │ │ │ └── Checking Unions with Index Signatures.ts │ │ │ ├── JSDoc Improvements │ │ │ │ └── Accessibility Modifiers.js │ │ │ └── Syntax and Messaging │ │ │ │ ├── Export Modules From.ts │ │ │ │ ├── Private Class Fields.ts │ │ │ │ └── Type Imports.tsx │ │ ├── 4-0 │ │ │ ├── New Checks │ │ │ │ └── Class Constructor Code Flow.ts │ │ │ ├── New JS Features │ │ │ │ ├── JSDoc Deprecated.ts │ │ │ │ ├── Logical Operators and Assignment.ts │ │ │ │ └── Nullish Coalescing.ts │ │ │ └── New TS Features │ │ │ │ ├── Named Tuples.ts │ │ │ │ ├── Unknown in Catch.ts │ │ │ │ └── Variadic Tuples.ts │ │ ├── 4-1 │ │ │ ├── New JS Features │ │ │ │ ├── New JSX Support.tsx │ │ │ │ └── See in JSDoc.ts │ │ │ └── Template Literals │ │ │ │ ├── Intro to Template Literals.ts │ │ │ │ ├── Mapped Types with Template Literals.ts │ │ │ │ └── String Manipulation with Template Literals.ts │ │ ├── JavaScript │ │ │ ├── External APIs │ │ │ │ ├── TypeScript with Deno.ts │ │ │ │ ├── TypeScript with Node.js │ │ │ │ ├── TypeScript with React.tsx │ │ │ │ ├── TypeScript with Web.js │ │ │ │ └── TypeScript with WebGL.js │ │ │ ├── Functions with JavaScript │ │ │ │ ├── Function Chaining.ts │ │ │ │ ├── Generic Functions.ts │ │ │ │ └── Typing Functions.ts │ │ │ ├── Helping with JavaScript │ │ │ │ ├── Errors.ts │ │ │ │ └── Quick Fixes.ts │ │ │ ├── JavaScript Essentials │ │ │ │ ├── Code Flow.ts │ │ │ │ ├── Functions.ts │ │ │ │ ├── Hello World.ts │ │ │ │ └── Objects and Arrays.ts │ │ │ ├── Modern JavaScript │ │ │ │ ├── Async Await.ts │ │ │ │ ├── Immutability.ts │ │ │ │ ├── Import Export.ts │ │ │ │ └── JSDoc Support.js │ │ │ └── Working With Classes │ │ │ │ ├── Classes 101.ts │ │ │ │ ├── Generic Classes.ts │ │ │ │ ├── Mixins.ts │ │ │ │ └── This.ts │ │ ├── Playground │ │ │ ├── Config │ │ │ │ ├── JavaScript Playgrounds.js │ │ │ │ └── New Compiler Defaults.ts │ │ │ ├── Language │ │ │ │ ├── Automatic Type Acquisition.ts │ │ │ │ └── Fixits.ts │ │ │ └── Tooling │ │ │ │ ├── Mobile Support.ts │ │ │ │ ├── Sharable URLs.ts │ │ │ │ └── TypeScript Versions.ts │ │ ├── TypeScript │ │ │ ├── Language Extensions │ │ │ │ ├── Enums.ts │ │ │ │ ├── Nominal Typing.ts │ │ │ │ └── Types vs Interfaces.ts │ │ │ ├── Language │ │ │ │ ├── Soundness.ts │ │ │ │ ├── Structural Typing.ts │ │ │ │ ├── Type Guards.ts │ │ │ │ └── Type Widening and Narrowing.ts │ │ │ ├── Meta-Types │ │ │ │ ├── Conditional Types.ts │ │ │ │ ├── Discriminate Types.ts │ │ │ │ ├── Indexed Types.ts │ │ │ │ └── Mapped Types.ts │ │ │ ├── Primitives │ │ │ │ ├── Any.ts │ │ │ │ ├── Literals.ts │ │ │ │ ├── Union and Intersection Types.ts │ │ │ │ └── Unknown and Never.ts │ │ │ └── Type Primitives │ │ │ │ ├── Built-in Utility Types.ts │ │ │ │ ├── Nullable Types.ts │ │ │ │ └── Tuples.ts │ │ └── sections.json │ ├── vo │ │ ├── JavaScript │ │ │ └── JavaScript Essentials │ │ │ │ ├── Code Flow.ts │ │ │ │ ├── Functions.ts │ │ │ │ ├── Hello World.ts │ │ │ │ └── Objects and Arrays.ts │ │ └── sections.json │ └── zh │ │ ├── JavaScript │ │ ├── External APIs │ │ │ ├── TypeScript with Deno.ts │ │ │ ├── TypeScript with Node.js │ │ │ ├── TypeScript with React.tsx │ │ │ ├── TypeScript with Web.js │ │ │ └── TypeScript with WebGL.js │ │ ├── Functions with JavaScript │ │ │ ├── Function Chaining.ts │ │ │ ├── Generic Functions.ts │ │ │ └── Typing Functions.ts │ │ ├── Helping with JavaScript │ │ │ ├── Errors.ts │ │ │ └── Quick Fixes.ts │ │ ├── JavaScript Essentials │ │ │ ├── Code Flow.ts │ │ │ ├── Functions.ts │ │ │ ├── Hello World.ts │ │ │ └── Objects and Arrays.ts │ │ ├── Modern JavaScript │ │ │ ├── Async Await.ts │ │ │ ├── Immutability.ts │ │ │ ├── Import Export.ts │ │ │ └── JSDoc Support.js │ │ ├── README.md │ │ └── Working With Classes │ │ │ ├── Classes 101.ts │ │ │ ├── Generic Classes.ts │ │ │ ├── Mixins.ts │ │ │ └── This.ts │ │ ├── Playground │ │ ├── Config │ │ │ ├── JavaScript Playgrounds.js │ │ │ └── New Compiler Defaults.ts │ │ ├── Language │ │ │ ├── Automatic Type Acquisition.ts │ │ │ └── Fixits.ts │ │ └── Tooling │ │ │ ├── Mobile Support.ts │ │ │ ├── Sharable URLs.ts │ │ │ └── TypeScript Versions.ts │ │ ├── TypeScript │ │ ├── Language Extensions │ │ │ ├── Enums.ts │ │ │ ├── Nominal Typing.ts │ │ │ └── Types vs Interfaces.ts │ │ ├── Language │ │ │ ├── Soundness.ts │ │ │ ├── Structural Typing.ts │ │ │ ├── Type Guards.ts │ │ │ └── Type Widening and Narrowing.ts │ │ ├── Meta-Types │ │ │ ├── Conditional Types.ts │ │ │ ├── Discriminate Types.ts │ │ │ ├── Indexed Types.ts │ │ │ └── Mapped Types.ts │ │ ├── Primitives │ │ │ ├── Any.ts │ │ │ ├── Literals.ts │ │ │ ├── Union and Intersection Types.ts │ │ │ └── Unknown and Never.ts │ │ ├── README.md │ │ └── Type Primitives │ │ │ ├── Built-in Utility Types.ts │ │ │ ├── Nullable Types.ts │ │ │ └── Tuples.ts │ │ └── sections.json ├── tsconfig │ ├── es │ │ ├── categories │ │ │ ├── Additional_Checks_6176.md │ │ │ ├── Advanced_Options_6178.md │ │ │ ├── Basic_Options_6172.md │ │ │ ├── Command_line_Options_6171.md │ │ │ ├── Experimental_Options_6177.md │ │ │ ├── Module_Resolution_Options_6174.md │ │ │ ├── Project_Files_0.md │ │ │ ├── Source_Map_Options_6175.md │ │ │ ├── Strict_Type_Checking_Options_6173.md │ │ │ └── Watch_and_Build_Modes_6250.md │ │ ├── intro.md │ │ ├── options │ │ │ ├── allowJs.md │ │ │ ├── allowSyntheticDefaultImports.md │ │ │ ├── allowUmdGlobalAccess.md │ │ │ ├── allowUnreachableCode.md │ │ │ ├── allowUnusedLabels.md │ │ │ ├── alwaysStrict.md │ │ │ ├── assumeChangesOnlyAffectDirectDependencies.md │ │ │ ├── baseUrl.md │ │ │ ├── charset.md │ │ │ ├── checkJs.md │ │ │ ├── composite.md │ │ │ ├── declaration.md │ │ │ ├── declarationDir.md │ │ │ ├── declarationMap.md │ │ │ └── diagnostics.md │ │ └── sections │ │ │ ├── compilerOptions.md │ │ │ └── watchOptions.md │ ├── fr │ │ ├── categories │ │ │ └── Watch_and_Build_Modes_6250.md │ │ ├── intro.md │ │ ├── options │ │ │ └── alwaysStrict.md │ │ └── sections │ │ │ └── watchOptions.md │ ├── id │ │ ├── categories │ │ │ ├── Additional_Checks_6176.md │ │ │ ├── Advanced_Options_6178.md │ │ │ ├── Basic_Options_6172.md │ │ │ ├── Command_line_Options_6171.md │ │ │ ├── Experimental_Options_6177.md │ │ │ ├── Module_Resolution_Options_6174.md │ │ │ ├── Project_Files_0.md │ │ │ ├── Source_Map_Options_6175.md │ │ │ ├── Strict_Type_Checking_Options_6173.md │ │ │ └── Watch_and_Build_Modes_6250.md │ │ ├── intro.md │ │ ├── options │ │ │ ├── allowJs.md │ │ │ ├── allowSyntheticDefaultImports.md │ │ │ ├── allowUmdGlobalAccess.md │ │ │ ├── allowUnreachableCode.md │ │ │ ├── allowUnusedLabels.md │ │ │ ├── alwaysStrict.md │ │ │ ├── assumeChangesOnlyAffectDirectDependencies.md │ │ │ ├── baseUrl.md │ │ │ ├── charset.md │ │ │ ├── checkJs.md │ │ │ ├── composite.md │ │ │ ├── declaration.md │ │ │ ├── declarationDir.md │ │ │ ├── declarationMap.md │ │ │ ├── diagnostics.md │ │ │ ├── disableReferencedProjectLoad.md │ │ │ ├── disableSizeLimit.md │ │ │ ├── disableSolutionSearching.md │ │ │ ├── disableSourceOfProjectReferenceRedirect.md │ │ │ ├── downlevelIteration.md │ │ │ ├── emitBOM.md │ │ │ ├── emitDeclarationOnly.md │ │ │ ├── emitDecoratorMetadata.md │ │ │ ├── esModuleInterop.md │ │ │ ├── exclude.md │ │ │ ├── experimentalDecorators.md │ │ │ ├── extendedDiagnostics.md │ │ │ ├── extends.md │ │ │ ├── fallbackPolling.md │ │ │ ├── files.md │ │ │ ├── forceConsistentCasingInFileNames.md │ │ │ ├── generateCpuProfile.md │ │ │ ├── importHelpers.md │ │ │ ├── importsNotUsedAsValues.md │ │ │ ├── include.md │ │ │ ├── incremental.md │ │ │ ├── inlineSourceMap.md │ │ │ ├── inlineSources.md │ │ │ ├── isolatedModules.md │ │ │ ├── jsx.md │ │ │ ├── jsxFactory.md │ │ │ ├── jsxFragmentFactory.md │ │ │ ├── noImplicitAny.md │ │ │ ├── noImplicitReturns.md │ │ │ ├── noImplicitThis.md │ │ │ ├── noImplicitUseStrict.md │ │ │ ├── out.md │ │ │ ├── outDir.md │ │ │ ├── outFile.md │ │ │ ├── reactNamespace.md │ │ │ ├── references.md │ │ │ ├── removeComments.md │ │ │ ├── resolveJsonModule.md │ │ │ ├── rootDir.md │ │ │ ├── rootDirs.md │ │ │ ├── skipDefaultLibCheck.md │ │ │ ├── skipLibCheck.md │ │ │ ├── target.md │ │ │ ├── types.md │ │ │ ├── watchDirectory.md │ │ │ └── watchFile.md │ │ └── sections │ │ │ ├── compilerOptions.md │ │ │ └── watchOptions.md │ ├── it │ │ ├── intro.md │ │ ├── options │ │ │ ├── allowJs.md │ │ │ ├── allowSyntheticDefaultImports.md │ │ │ ├── allowUmdGlobalAccess.md │ │ │ ├── allowUnreachableCode.md │ │ │ ├── allowUnusedLabels.md │ │ │ ├── alwaysStrict.md │ │ │ ├── assumeChangesOnlyAffectDirectDependencies.md │ │ │ ├── baseUrl.md │ │ │ ├── charset.md │ │ │ ├── checkJs.md │ │ │ ├── composite.md │ │ │ ├── declaration.md │ │ │ ├── declarationDir.md │ │ │ ├── declarationMap.md │ │ │ ├── diagnostics.md │ │ │ ├── disableReferencedProjectLoad.md │ │ │ ├── disableSizeLimit.md │ │ │ ├── downlevelIteration.md │ │ │ ├── importHelpers.md │ │ │ ├── incremental.md │ │ │ ├── isolatedModules.md │ │ │ ├── jsx.md │ │ │ ├── lib.md │ │ │ ├── module.md │ │ │ ├── noEmit.md │ │ │ ├── outDir.md │ │ │ ├── outFile.md │ │ │ ├── plugins.md │ │ │ ├── removeComments.md │ │ │ ├── rootDir.md │ │ │ ├── sourceMap.md │ │ │ ├── target.md │ │ │ ├── tsBuildInfoFile.md │ │ │ └── watchFile.md │ │ └── sections │ │ │ ├── compilerOptions.md │ │ │ └── watchOptions.md │ ├── ja │ │ ├── categories │ │ │ ├── Additional_Checks_6176.md │ │ │ ├── Advanced_Options_6178.md │ │ │ ├── Basic_Options_6172.md │ │ │ ├── Command_line_Options_6171.md │ │ │ ├── Experimental_Options_6177.md │ │ │ ├── Module_Resolution_Options_6174.md │ │ │ ├── Project_Files_0.md │ │ │ ├── Source_Map_Options_6175.md │ │ │ ├── Strict_Type_Checking_Options_6173.md │ │ │ └── Watch_and_Build_Modes_6250.md │ │ ├── intro.md │ │ ├── options │ │ │ ├── allowJs.md │ │ │ ├── allowSyntheticDefaultImports.md │ │ │ ├── allowUmdGlobalAccess.md │ │ │ ├── allowUnreachableCode.md │ │ │ ├── allowUnusedLabels.md │ │ │ ├── alwaysStrict.md │ │ │ ├── assumeChangesOnlyAffectDirectDependencies.md │ │ │ ├── baseUrl.md │ │ │ ├── charset.md │ │ │ ├── checkJs.md │ │ │ ├── composite.md │ │ │ ├── declaration.md │ │ │ ├── declarationDir.md │ │ │ ├── declarationMap.md │ │ │ ├── diagnostics.md │ │ │ ├── disableReferencedProjectLoad.md │ │ │ ├── disableSizeLimit.md │ │ │ ├── disableSolutionSearching.md │ │ │ ├── disableSourceOfProjectReferenceRedirect.md │ │ │ ├── downlevelIteration.md │ │ │ ├── emitBOM.md │ │ │ ├── emitDeclarationOnly.md │ │ │ ├── emitDecoratorMetadata.md │ │ │ ├── esModuleInterop.md │ │ │ ├── exclude.md │ │ │ ├── experimentalDecorators.md │ │ │ ├── extendedDiagnostics.md │ │ │ ├── extends.md │ │ │ ├── fallbackPolling.md │ │ │ ├── files.md │ │ │ ├── forceConsistentCasingInFileNames.md │ │ │ ├── generateCpuProfile.md │ │ │ ├── importHelpers.md │ │ │ ├── importsNotUsedAsValues.md │ │ │ ├── include.md │ │ │ ├── incremental.md │ │ │ ├── inlineSourceMap.md │ │ │ ├── inlineSources.md │ │ │ ├── isolatedModules.md │ │ │ ├── jsx.md │ │ │ ├── jsxFactory.md │ │ │ ├── jsxFragmentFactory.md │ │ │ ├── jsxImportSource.md │ │ │ ├── keyofStringsOnly.md │ │ │ ├── lib.md │ │ │ ├── listEmittedFiles.md │ │ │ ├── listFiles.md │ │ │ ├── locale.md │ │ │ ├── mapRoot.md │ │ │ ├── maxNodeModuleJsDepth.md │ │ │ ├── module.md │ │ │ ├── moduleResolution.md │ │ │ ├── newLine.md │ │ │ ├── noEmit.md │ │ │ ├── noEmitHelpers.md │ │ │ ├── noEmitOnError.md │ │ │ ├── noErrorTruncation.md │ │ │ ├── noFallthroughCasesInSwitch.md │ │ │ ├── noImplicitAny.md │ │ │ ├── noImplicitReturns.md │ │ │ ├── noImplicitThis.md │ │ │ ├── noImplicitUseStrict.md │ │ │ ├── noLib.md │ │ │ ├── noResolve.md │ │ │ ├── noStrictGenericChecks.md │ │ │ ├── noUncheckedIndexedAccess.md │ │ │ ├── noUnusedLocals.md │ │ │ ├── noUnusedParameters.md │ │ │ ├── out.md │ │ │ ├── outDir.md │ │ │ ├── outFile.md │ │ │ ├── paths.md │ │ │ ├── plugins.md │ │ │ ├── preserveConstEnums.md │ │ │ ├── preserveSymlinks.md │ │ │ ├── preserveWatchOutput.md │ │ │ ├── pretty.md │ │ │ ├── reactNamespace.md │ │ │ ├── references.md │ │ │ ├── removeComments.md │ │ │ ├── resolveJsonModule.md │ │ │ ├── rootDir.md │ │ │ ├── rootDirs.md │ │ │ ├── skipDefaultLibCheck.md │ │ │ ├── skipLibCheck.md │ │ │ ├── sourceMap.md │ │ │ ├── sourceRoot.md │ │ │ ├── strict.md │ │ │ ├── strictBindCallApply.md │ │ │ ├── strictFunctionTypes.md │ │ │ ├── strictNullChecks.md │ │ │ ├── strictPropertyInitialization.md │ │ │ ├── stripInternal.md │ │ │ ├── suppressExcessPropertyErrors.md │ │ │ ├── suppressImplicitAnyIndexErrors.md │ │ │ ├── target.md │ │ │ ├── traceResolution.md │ │ │ ├── tsBuildInfoFile.md │ │ │ ├── typeAcquisition.md │ │ │ ├── typeRoots.md │ │ │ ├── types.md │ │ │ ├── useDefineForClassFields.md │ │ │ ├── watchDirectory.md │ │ │ └── watchFile.md │ │ └── sections │ │ │ ├── compilerOptions.md │ │ │ └── watchOptions.md │ ├── ko │ │ ├── categories │ │ │ ├── Additional_Checks_6176.md │ │ │ ├── Advanced_Options_6178.md │ │ │ ├── Basic_Options_6172.md │ │ │ ├── Command_line_Options_6171.md │ │ │ ├── Experimental_Options_6177.md │ │ │ ├── Module_Resolution_Options_6174.md │ │ │ ├── Project_Files_0.md │ │ │ ├── Source_Map_Options_6175.md │ │ │ └── Strict_Type_Checking_Options_6173.md │ │ ├── intro.md │ │ └── options │ │ │ ├── alwaysStrict.md │ │ │ ├── baseUrl.md │ │ │ ├── charset.md │ │ │ ├── composite.md │ │ │ ├── declaration.md │ │ │ ├── exclude.md │ │ │ ├── files.md │ │ │ ├── include.md │ │ │ ├── jsxFragmentFactory.md │ │ │ ├── jsxImportSource.md │ │ │ ├── lib.md │ │ │ ├── listFiles.md │ │ │ ├── locale.md │ │ │ ├── moduleResolution.md │ │ │ ├── newLine.md │ │ │ ├── noImplicitAny.md │ │ │ ├── noResolve.md │ │ │ ├── out.md │ │ │ ├── outDir.md │ │ │ ├── outFile.md │ │ │ ├── paths.md │ │ │ ├── plugins.md │ │ │ ├── sourceRoot.md │ │ │ ├── strict.md │ │ │ ├── target.md │ │ │ └── traceResolution.md │ ├── pt │ │ ├── categories │ │ │ ├── Additional_Checks_6176.md │ │ │ ├── Advanced_Options_6178.md │ │ │ ├── Basic_Options_6172.md │ │ │ ├── Command_line_Options_6171.md │ │ │ ├── Experimental_Options_6177.md │ │ │ ├── Module_Resolution_Options_6174.md │ │ │ ├── Project_Files_0.md │ │ │ ├── Source_Map_Options_6175.md │ │ │ ├── Strict_Type_Checking_Options_6173.md │ │ │ └── Watch_and_Build_Modes_6250.md │ │ ├── intro.md │ │ ├── options │ │ │ ├── allowJs.md │ │ │ ├── allowSyntheticDefaultImports.md │ │ │ ├── allowUmdGlobalAccess.md │ │ │ ├── allowUnreachableCode.md │ │ │ ├── allowUnusedLabels.md │ │ │ ├── alwaysStrict.md │ │ │ ├── assumeChangesOnlyAffectDirectDependencies.md │ │ │ ├── baseUrl.md │ │ │ ├── charset.md │ │ │ ├── checkJs.md │ │ │ ├── composite.md │ │ │ ├── declaration.md │ │ │ ├── declarationDir.md │ │ │ ├── declarationMap.md │ │ │ ├── diagnostics.md │ │ │ ├── disableReferencedProjectLoad.md │ │ │ ├── disableSizeLimit.md │ │ │ ├── disableSolutionSearching.md │ │ │ ├── disableSourceOfProjectReferenceRedirect.md │ │ │ ├── downlevelIteration.md │ │ │ ├── emitBOM.md │ │ │ ├── emitDeclarationOnly.md │ │ │ ├── emitDecoratorMetadata.md │ │ │ ├── esModuleInterop.md │ │ │ ├── exclude.md │ │ │ ├── experimentalDecorators.md │ │ │ ├── explainFiles.md │ │ │ ├── extendedDiagnostics.md │ │ │ ├── extends.md │ │ │ ├── fallbackPolling.md │ │ │ ├── files.md │ │ │ ├── forceConsistentCasingInFileNames.md │ │ │ ├── generateCpuProfile.md │ │ │ ├── importHelpers.md │ │ │ ├── importsNotUsedAsValues.md │ │ │ ├── include.md │ │ │ ├── incremental.md │ │ │ ├── inlineSourceMap.md │ │ │ ├── inlineSources.md │ │ │ ├── isolatedModules.md │ │ │ ├── jsx.md │ │ │ ├── jsxFactory.md │ │ │ ├── jsxFragmentFactory.md │ │ │ ├── jsxImportSource.md │ │ │ ├── keyofStringsOnly.md │ │ │ ├── lib.md │ │ │ ├── listEmittedFiles.md │ │ │ ├── listFiles.md │ │ │ ├── locale.md │ │ │ ├── mapRoot.md │ │ │ ├── maxNodeModuleJsDepth.md │ │ │ ├── module.md │ │ │ ├── moduleResolution.md │ │ │ ├── newLine.md │ │ │ ├── noEmit.md │ │ │ ├── noEmitHelpers.md │ │ │ ├── noEmitOnError.md │ │ │ ├── noErrorTruncation.md │ │ │ ├── noFallthroughCasesInSwitch.md │ │ │ ├── noImplicitAny.md │ │ │ ├── noImplicitReturns.md │ │ │ ├── noImplicitThis.md │ │ │ ├── noImplicitUseStrict.md │ │ │ ├── noLib.md │ │ │ ├── noPropertyAccessFromIndexSignature.md │ │ │ ├── noResolve.md │ │ │ ├── noStrictGenericChecks.md │ │ │ ├── noUncheckedIndexedAccess.md │ │ │ ├── noUnusedLocals.md │ │ │ ├── noUnusedParameters.md │ │ │ ├── out.md │ │ │ ├── outDir.md │ │ │ ├── outFile.md │ │ │ ├── paths.md │ │ │ ├── plugins.md │ │ │ ├── preserveConstEnums.md │ │ │ ├── preserveSymlinks.md │ │ │ ├── preserveWatchOutput.md │ │ │ ├── pretty.md │ │ │ ├── reactNamespace.md │ │ │ ├── references.md │ │ │ ├── removeComments.md │ │ │ ├── resolveJsonModule.md │ │ │ ├── rootDir.md │ │ │ ├── rootDirs.md │ │ │ ├── skipDefaultLibCheck.md │ │ │ ├── skipLibCheck.md │ │ │ ├── sourceMap.md │ │ │ ├── sourceRoot.md │ │ │ ├── strict.md │ │ │ ├── strictBindCallApply.md │ │ │ ├── strictFunctionTypes.md │ │ │ ├── strictNullChecks.md │ │ │ ├── strictPropertyInitialization.md │ │ │ ├── stripInternal.md │ │ │ ├── suppressExcessPropertyErrors.md │ │ │ ├── suppressImplicitAnyIndexErrors.md │ │ │ ├── target.md │ │ │ ├── traceResolution.md │ │ │ ├── tsBuildInfoFile.md │ │ │ ├── typeAcquisition.md │ │ │ ├── typeRoots.md │ │ │ ├── types.md │ │ │ ├── useDefineForClassFields.md │ │ │ ├── watchDirectory.md │ │ │ └── watchFile.md │ │ └── sections │ │ │ ├── compilerOptions.md │ │ │ └── watchOptions.md │ ├── vo │ │ ├── categories │ │ │ ├── Basic_Options_6172.md │ │ │ └── Project_Files_0.md │ │ └── options │ │ │ ├── files.md │ │ │ └── noImplicitAny.md │ └── zh │ │ ├── categories │ │ ├── Additional_Checks_6176.md │ │ ├── Advanced_Options_6178.md │ │ ├── Basic_Options_6172.md │ │ ├── Command_line_Options_6171.md │ │ ├── Experimental_Options_6177.md │ │ ├── Module_Resolution_Options_6174.md │ │ ├── Project_Files_0.md │ │ ├── Source_Map_Options_6175.md │ │ ├── Strict_Type_Checking_Options_6173.md │ │ └── Watch_and_Build_Modes_6250.md │ │ ├── intro.md │ │ ├── options │ │ ├── allowJs.md │ │ ├── allowSyntheticDefaultImports.md │ │ ├── allowUmdGlobalAccess.md │ │ ├── baseUrl.md │ │ ├── checkJs.md │ │ ├── composite.md │ │ ├── declaration.md │ │ ├── downlevelIteration.md │ │ ├── esModuleInterop.md │ │ ├── importHelpers.md │ │ ├── incremental.md │ │ ├── isolatedModules.md │ │ ├── jsx.md │ │ ├── lib.md │ │ ├── module.md │ │ ├── moduleResolution.md │ │ ├── noEmit.md │ │ ├── outDir.md │ │ ├── outFile.md │ │ ├── paths.md │ │ ├── plugins.md │ │ ├── preserveSymlinks.md │ │ ├── removeComments.md │ │ ├── rootDir.md │ │ ├── rootDirs.md │ │ ├── sourceMap.md │ │ ├── target.md │ │ ├── tsBuildInfoFile.md │ │ ├── typeRoots.md │ │ └── types.md │ │ └── sections │ │ └── compilerOptions.md └── typescriptlang │ ├── es │ ├── community.ts │ ├── documentation.ts │ ├── es.ts │ ├── handbook.ts │ ├── head-seo.ts │ ├── index.ts │ ├── nav.ts │ ├── playground.ts │ └── tsconfig.ts │ ├── fr │ ├── cheatsheets.ts │ ├── community.ts │ ├── documentation.ts │ ├── dt.ts │ ├── footer.ts │ ├── fr.ts │ ├── handbook.ts │ ├── head-seo.ts │ ├── index.ts │ ├── index2.ts │ ├── nav.ts │ ├── playground.ts │ └── tsconfig.ts │ ├── id │ ├── community.ts │ ├── documentation.ts │ ├── dt.ts │ ├── handbook.ts │ ├── head-seo.ts │ ├── id.ts │ ├── index.ts │ ├── nav.ts │ ├── playground.ts │ └── tsconfig.ts │ ├── ja │ ├── community.ts │ ├── documentation.ts │ ├── handbook.ts │ ├── head-seo.ts │ ├── ja.ts │ ├── nav.ts │ ├── playground.ts │ └── tsconfig.ts │ ├── ko │ ├── community.ts │ ├── ko.ts │ └── nav.ts │ ├── pl │ ├── community.ts │ ├── documentation.ts │ ├── dt.ts │ ├── handbook.ts │ ├── head-seo.ts │ ├── index.ts │ ├── nav.ts │ ├── pl.ts │ └── playground.ts │ ├── pt │ ├── community.ts │ ├── documentation.ts │ ├── dt.ts │ ├── handbook.ts │ ├── head-seo.ts │ ├── index.ts │ ├── nav.ts │ ├── playground.ts │ └── pt.ts │ ├── vo │ ├── nav.ts │ └── vo.ts │ └── zh │ ├── community.ts │ ├── documentation.ts │ ├── handbook.ts │ ├── head-seo.ts │ ├── index.ts │ ├── nav.ts │ ├── playground.ts │ ├── tsconfig.ts │ └── zh.ts ├── localize.json ├── package.json ├── scripts ├── lint.js └── recursiveReadDirSync.js ├── starting_new_language.md ├── welcome.md └── yarn.lock /.github/workflows/codeowners-merge.yml: -------------------------------------------------------------------------------- 1 | name: Codeowners merging 2 | on: 3 | pull_request_target: { types: [opened, synchronize, reopened] } 4 | issue_comment: { types: [created] } 5 | pull_request_review: { types: [submitted] } 6 | 7 | jobs: 8 | merge-check: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - uses: actions/checkout@v1 13 | - name: Run Codeowners merge check 14 | env: 15 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 16 | uses: OSS-Docs-Tools/code-owner-self-merge@master 17 | with: 18 | if_no_maintainers_add_label: 'maintainers' 19 | if_no_maintainers_assign: '@orta' -------------------------------------------------------------------------------- /.github/workflows/post-localizations.yml: -------------------------------------------------------------------------------- 1 | on: 2 | pull_request_target: 3 | types: [assigned, opened, synchronize, reopened] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v1 11 | - uses: actions/setup-node@v1 12 | with: 13 | node-version: "13.x" 14 | 15 | - run: yarn install 16 | 17 | - run: yarn danger ci 18 | env: 19 | DEBUG: "*" 20 | DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | AZURE_TRANSLATE_KEY: ${{ secrets.AZURE_TRANSLATE_KEY }} 22 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /docs/documentation/fr/tutorials/Angular.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Angular 3 | layout: docs 4 | permalink: /fr/docs/handbook/angular.html 5 | oneline: Utiliser Angular avec TypeScript 6 | deprecated: true 7 | --- 8 | 9 | Angular est un framework moderne entièrement construit en TypeScript et, par conséquent, l'utilisation de TypeScript avec Angular offre une expérience fluide. 10 | 11 | La documentation d'Angular ne met pas seulement TypeScript au premier plan, mais l'utilise également comme langage principal. 12 | Dans cet esprit, [le site d'Angular](https://angular.io) sera toujours la référence la plus à jour pour utiliser Angular avec TypeScript. 13 | 14 | Consultez le [guide de démarrage rapide ici](https://angular.io/docs/ts/latest/quickstart.html) pour commencer à apprendre Angular maintenant ! 15 | -------------------------------------------------------------------------------- /docs/documentation/ko/declaration-files/Templates.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Templates 3 | layout: docs 4 | permalink: /ko/docs/handbook/declaration-files/templates.html 5 | oneline: "Different d.ts module template examples" 6 | --- 7 | 8 | [global-modifying-module.d.ts](./templates/global-modifying-module.d.ts.md) 9 | 10 | - [global-plugin.d.ts](/docs/handbook/declaration-files/templates/global-plugin-d-ts.html) 11 | - [global.d.ts](/docs/handbook/declaration-files/templates/global-d-ts.html) 12 | - [module-class.d.ts](/docs/handbook/declaration-files/templates/module-class-d-ts.html) 13 | - [module-function.d.ts](/docs/handbook/declaration-files/templates/module-function-d-ts.html) 14 | - [module-plugin.d.ts](/docs/handbook/declaration-files/templates/module-plugin-d-ts.html) 15 | - [module.d.ts](/docs/handbook/declaration-files/templates/module-d-ts.html) 16 | -------------------------------------------------------------------------------- /docs/documentation/vo/handbook-v1/Basic Types.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: B4s1c Typ3s 3 | layout: docs 4 | permalink: /vo/docs/handbook/basic-types.html 5 | oneline: "5tep on3 in learning 7ype5cript: The basics types." 6 | --- 7 | 8 | ## 1ntr0duc7un 9 | 10 | For programs to be useful, we n33d 2 be able to work wth sum of the s1mplest units of data: numbers, strings, structures, boolean values, and the like. 11 | In TypeScript, we support much the same types as you would expect in JavaScript, with a convenient enumeration type thrown in to help things along. 12 | 13 | ## B00lean 14 | 15 | The most basic datatype is the simple true/false value, which JavaScript and TypeScript call a `boolean` value. 16 | 17 | ```ts twoslash 18 | let isD0ne: boolean = false; 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/playground/fa/JavaScript/README.md: -------------------------------------------------------------------------------- 1 | ## مثال های جاوااسکریپت 2 | 3 | این مثال ها به ما چگونگی اجرای جاوااسکریپت توسط تایپ‌اسکریپت را نشان می‌دهند. با اینکه در بعضی از مثال‌ها از قابلیت‌های ساده تایپ‌اسکریپت استفاده می‌کنیم اما هدف اصلی این دسته از مثال‌ها نشان دادن سادگی استفاده مجدد از دانسته‌های کاربر در جاوااسکریپت در تایپ‌اسکریپت است. 4 | -------------------------------------------------------------------------------- /docs/playground/fr/3-7/Fixits/Const to let.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": {}, "order": 1} 2 | 3 | // La version 3.7 apporte la capacité à convertir rapidement une déclaration 4 | // const en let quand elle est ré-assignée. 5 | 6 | // Vous pouvez essayer ceci en surlignant l'erreur ci dessous et en éxecutant la correction automatique. 7 | 8 | const displayName = "Andrew"; 9 | 10 | displayName = "Andrea"; 11 | -------------------------------------------------------------------------------- /docs/playground/id/3-7/Fixits/Const to let.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": {}, "order": 1} 2 | 3 | // Fitur baru yang terdapat pada versi 3.7 4 | // adalah kemampuan untuk menerjemahkan sebuah 5 | // variabel `const` ke sebuah `let` ketika nilainya 6 | // telah ditetapkan kembali. 7 | 8 | // Anda dapat mencoba fitur ini dengan menyoroti kesalahan dibawah ini 9 | // dan memilih untuk mengeksekusi `Quick Fix` 10 | 11 | const displayName = "Andrew"; 12 | 13 | displayName = "Andrea"; 14 | -------------------------------------------------------------------------------- /docs/playground/id/4-0/New Checks/Class Constructor Code Flow.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "ts": "4.0.2" }} 2 | // 3 | // Pada TypeScript versi 4.0, kami menggunakan analisis 4 | // alur program untuk menyimpulkan tipe dari sebuah atribut kelas 5 | // berdasarkan nilai yang ditetapkan pada _constructor_. 6 | 7 | class AkunPengguna { 8 | id; // Tipe disimpulkan sebagai sebuah _string_ atau bilangan 9 | constructor(admin: boolean) { 10 | if (admin) { 11 | this.id = "admin"; 12 | } else { 13 | this.id = 0; 14 | } 15 | } 16 | } 17 | 18 | // Pada TypeScript versi-versi sebelumnya, `id` akan 19 | // disimpulkan sebagai sebuah `any`. 20 | -------------------------------------------------------------------------------- /docs/playground/id/JavaScript/Helping with JavaScript/Quick Fixes.ts: -------------------------------------------------------------------------------- 1 | // TypeScript menyediakan rekomendasi perbaikan cepat 2 | // untuk kejadian umum. _Prompt_ akan muncul di editor 3 | // Anda berdasarkan rekomendasi-rekomendasi tersebut. 4 | 5 | // Sebagai contoh, TypeScript dapat menyediakan perbaikan 6 | // cepat untuk kesalahan eja pada tipe data Anda: 7 | 8 | const bilanganEuler = 2.7182818284; 9 | bilanganEuler.toStrang(); 10 | // ^______^ - pilih kode ini untuk melihat lampu bohlam. 11 | 12 | class ContohKelas { 13 | method() { 14 | this.tidakDideklarasikan = 10; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docs/playground/ja/3-7/Fixits/Const to let.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": {}, "order": 1} 2 | 3 | // 3.7では、const変数の値が再代入されたときに、素早くletに変換する機能が追加されました。 4 | 5 | // 以下のエラーをハイライトして、クイックフィックスを実行することで試すことができます。 6 | 7 | const displayName = 'Andrew' 8 | 9 | displayName = 'Andrea' 10 | -------------------------------------------------------------------------------- /docs/playground/ja/3-7/Fixits/Infer From Usage Changes.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "noImplicitAny": false }, "order": 2} 2 | 3 | // 3.7 で TypeScript 既存の「使用状況からの推論」によるコード修正はよりスマートになりました。 4 | // 既知の重要な型 (string, number, array, Promise) のリストを用いて、 5 | // 型の使用方法がこれらのオブジェクトのAPIと一致するかどうかを推論する様になりました。 6 | 7 | // 次のいくつかの例では、関数のパラメータを選択し、電球をクリックして "Infer Parameter types..." を選択してください。 8 | 9 | // 数値配列の推論: 10 | 11 | function pushNumber(arr) { 12 | arr.push(12) 13 | } 14 | 15 | // promiseの推論: 16 | 17 | function awaitPromise(promise) { 18 | promise.then(value => console.log(value)) 19 | } 20 | 21 | // 関数とその戻り値の型の推論: 22 | 23 | function inferAny(app) { 24 | const result = app.use('hi') 25 | return result 26 | } 27 | 28 | // 文字列配列に文字列が追加された為、文字列配列を推論します: 29 | 30 | function insertString(names) { 31 | names[1] = 'hello' 32 | } 33 | -------------------------------------------------------------------------------- /docs/playground/ja/3-8/Syntax and Messaging/Export Modules From.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "ts": "3.8.3" }} 2 | // TypeScriptの再エクスポート機能が、ES2018で 3 | // 利用可能なより多くのケースをサポートするようになりました。 4 | // 5 | // JavaScriptのエクスポートには、依存関係の一部を 6 | // 簡潔に再エクスポートする機能があります: 7 | 8 | export { ScriptTransformer } from "@jest/transform"; 9 | 10 | // 以前のバージョンのTypeScriptでは、 11 | // オブジェクト全体をエクスポートしたい場合には 12 | // すこし冗長でした: 13 | 14 | import * as console from "@jest/console"; 15 | import * as reporters from "@jest/reporters"; 16 | 17 | export { console, reporters }; 18 | 19 | // 3.8では、TypeScriptはより多くのJavaScriptの仕様にある 20 | // エクスポート文の形をサポートすることで、 21 | // 1行でモジュールを再エクスポートできるようになりました。 22 | 23 | export * as jestConsole from "@jest/console"; 24 | export * as jestReporters from "@jest/reporters"; 25 | -------------------------------------------------------------------------------- /docs/playground/ja/4-0/New Checks/Class Constructor Code Flow.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "ts": "4.0.2" }} 2 | 3 | // 4.0では、コントロールフロー解析を利用し、 4 | // コンストラクタで設定された値に基づいて 5 | // クラスプロパティの潜在的な型を推測します。 6 | 7 | class UserAccount { 8 | id; // 型は次のように推測されます: string | number 9 | constructor(isAdmin: boolean) { 10 | if (isAdmin) { 11 | this.id = "admin"; 12 | } else { 13 | this.id = 0; 14 | } 15 | } 16 | } 17 | 18 | // 以前のバージョンのTypeScriptでは、`id`は 19 | // `any`と推測されていました。 20 | -------------------------------------------------------------------------------- /docs/playground/ja/4-0/New JS Features/JSDoc Deprecated.ts: -------------------------------------------------------------------------------- 1 | // 4.0では、JSDocのタグである@deprecatedが型システムに 2 | // 追加されました。今現在JSDocを使用しているところであれば 3 | // どこでも@deprecatedを使用できます。 4 | 5 | interface AccountInfo { 6 | name: string; 7 | gender: string; 8 | 9 | /** @deprecated 代わりにgenderフィールドを使用してください */ 10 | sex: "male" | "female"; 11 | } 12 | 13 | declare const userInfo: AccountInfo; 14 | userInfo.sex; 15 | 16 | // TypeScriptは、非推奨のプロパティにアクセスしたとき、 17 | // 処理を止めることはありませんが、警告を出します。 18 | // vscodeなどのエディタであればintellisenseやアウトライン、 19 | // コード内で、deprecatedタグの情報を表示します。 20 | -------------------------------------------------------------------------------- /docs/playground/ja/4-0/New TS Features/Unknown in Catch.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "ts": "4.0.2" }} 2 | 3 | // JavaScriptはどんな値もthrowできるため、 4 | // TypeScriptはエラーの型宣言をサポートしていません。 5 | 6 | try { 7 | // .. 8 | } catch (e) {} 9 | 10 | // 歴史的には、上記は、catch句の`e`はデフォルトが 11 | // anyであることを意味していました。 12 | // したがって、`e`の任意のプロパティに自由にアクセスできます。 13 | // 4.0では、catch句における型の割り当ての制限を緩め、 14 | // `any`と`unknown`の両方を許可するようにしました。 15 | 16 | // any型を付けた場合と同じふるまい: 17 | try { 18 | // .. 19 | } catch (e) { 20 | e.stack; 21 | } 22 | 23 | // unknown型を明示した場合のふるまい: 24 | 25 | try { 26 | // .. 27 | } catch (e: unknown) { 28 | // 型システムが、`e`がどんな型なのかを知るまで 29 | // `e`を利用することはできません。詳細は以下を確認してください: 30 | // example:unknown-and-never 31 | e.stack; 32 | 33 | if (e instanceof SyntaxError) { 34 | e.stack; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docs/playground/ja/4-1/New JS Features/See in JSDoc.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "ts": "4.1.0-beta" }} 2 | 3 | // 4.1では、TypeScriptとJavaScriptファイルの両方で 4 | // 使われているTypeScriptのJSDocパーサが 5 | // @seeパラメータをサポートします。 6 | 7 | // @seeを使えば、クリック(cmd/ctrl + クリック)するか、 8 | // あるいはマウスをホバーした時に表示される情報から 9 | // 関連するコードに素早くアクセスすることができます。 10 | 11 | /** 12 | * @see hello 13 | */ 14 | const goodbye = "Good"; 15 | 16 | /** 17 | * You say hi, I say low 18 | * 19 | * @see goodbye 20 | */ 21 | const hello = "Hello, hello"; 22 | -------------------------------------------------------------------------------- /docs/playground/ja/JavaScript/External APIs/TypeScript with Deno.ts: -------------------------------------------------------------------------------- 1 | //// { "order": 3} 2 | 3 | // Denoはセキュリティに重点を置いた開発中のv8ベースの 4 | // JavaScript及びTypeScriptのランタイムです。 5 | 6 | // https://deno.land 7 | 8 | // DenoはJavaScriptのファイルシステムやネットワークへのアクセスを減らす 9 | // サンドボックスベースの権限システムを採用し、 10 | // ローカルにダウンロードとキャッシュされるhttpベースのインポートを使用します。 11 | 12 | // 以下はdenoを使用した例です: 13 | 14 | import compose from "https://deno.land/x/denofun/lib/compose.ts"; 15 | 16 | function greet(name: string) { 17 | return `Hello, ${name}!`; 18 | } 19 | 20 | function makeLoud(x: string) { 21 | return x.toUpperCase(); 22 | } 23 | 24 | const greetLoudly = compose(makeLoud, greet); 25 | 26 | // "HELLO, WORLD!."を出力します 27 | greetLoudly("world"); 28 | 29 | import concat from "https://deno.land/x/denofun/lib/concat.ts"; 30 | 31 | // "helloworld"を返します 32 | concat("hello", "world"); 33 | -------------------------------------------------------------------------------- /docs/playground/ko/3-7/Fixits/Const to let.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": {}, "order": 1} 2 | 3 | // 3.7 버전의 새로운 기능은 4 | // 값이 재할당 되었을 때 const 변수를 let으로 5 | // 빠르게 변환하는 것입니다. 6 | 7 | // 아래 오류에 하이라이트 표시를 확인하고 8 | // 퀵 픽스를 실행해보세요. 9 | 10 | const displayName = "Andrew"; 11 | 12 | displayName = "Andrea"; 13 | -------------------------------------------------------------------------------- /docs/playground/ko/3-8/Syntax and Messaging/Export Modules From.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "ts": "3.8.3" }} 2 | // TypeScript의 다시 export 하는 기능을 통해 3 | // ES2018에서 이용할 수 있는 추가 사례들을 지원하는 데에 더 가까워졌습니다. 4 | 5 | // JavaScript export는 dependency 일부를 6 | // 우아하게 다시 export 할 수 있도록 합니다: 7 | 8 | export { ScriptTransformer } from "@jest/transform"; 9 | 10 | // 객체 전체를 export 하고 싶다면, 11 | // 이전 버전의 TypeScript에서 12 | // 조금 더 장황해집니다: 13 | 14 | import * as console from "@jest/console"; 15 | import * as reporters from "@jest/reporters"; 16 | 17 | export { console, reporters }; 18 | 19 | // TypeScript 3.8은, 20 | // JavaScript 사양의 export 보다 더 많은 양식을 제공하여, 21 | // 한 줄에 모듈을 다시 export 할 수 있도록 합니다. 22 | 23 | export * as jestConsole from "@jest/console"; 24 | export * as jestReporters from "@jest/reporters"; 25 | -------------------------------------------------------------------------------- /docs/playground/ko/4-0/New Checks/Class Constructor Code Flow.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "ts": "4.0.2" }} 2 | 3 | // 4.0에서는 제어 흐름 분석을 사용하여 4 | // 생성자에 설정된 값을 기반으로 5 | // 클래스 프로퍼티의 잠재적인 타입을 추론합니다. 6 | 7 | class UserAccount { 8 | id; // 타입은 string | number로 추론됩니다. 9 | constructor(isAdmin: boolean) { 10 | if (isAdmin) { 11 | this.id = "admin"; 12 | } else { 13 | this.id = 0; 14 | } 15 | } 16 | } 17 | 18 | // TypeScript 이전 버전에서는 19 | // 'id'가 'any'로 분류되었습니다. 20 | -------------------------------------------------------------------------------- /docs/playground/ko/4-0/New JS Features/JSDoc Deprecated.ts: -------------------------------------------------------------------------------- 1 | // 4.0에서 JSDoc 태그인 @deprecated가 타입 시스템에 추가됩니다. 2 | // 여러분이 현재 사용할 수 있는 JSDoc에 3 | // 어디서든 @deprecated를 사용할 수 있습니다. 4 | 5 | interface AccountInfo { 6 | name: string; 7 | gender: string; 8 | 9 | /** @deprecated gender 필드를 대신 사용하세요. */ 10 | sex: "male" | "female"; 11 | } 12 | 13 | declare const userInfo: AccountInfo; 14 | userInfo.sex; 15 | 16 | // 지원 중단된 프로퍼티에 접근되었을 때 17 | // TypeScript는 논 블로킹(non-blocking) 경고를 제공할 것이며, 18 | // vscode가 사용하는 것처럼 편집기는 intellisense, outline 그리고 여러분의 코드에서 19 | // 지원 중단된 정보를 표시할 것입니다. 20 | -------------------------------------------------------------------------------- /docs/playground/ko/4-0/New TS Features/Unknown in Catch.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "ts": "4.0.2" } } 2 | 3 | // JavaScript는 모든 값을 던질 수 있기 때문에 4 | // TypeScript는 오류 타입 선언을 지원하지 않습니다. 5 | 6 | try { 7 | // .. 8 | } catch (e) {} 9 | 10 | // 이것은 catch 절의 `e`가 기본적으로 any 타입인 것을 의미합니다. 11 | // 이것은 임의의 속성에 접근할 수 있는 자유를 허용합니다. 12 | // 4.0에서는 `any`와 `unknown`을 모두 허용하도록 catch절의 13 | // 타입 할당 제한을 완화했습니다. 14 | 15 | // any와 동일한 동작: 16 | try { 17 | // .. 18 | } catch (e) { 19 | e.stack 20 | } 21 | 22 | // unknown을 사용한 명시적 동작: 23 | 24 | try { 25 | // .. 26 | } catch (e: unknown) { 27 | // 타입 시스템이 `e`가 무엇인지 알기 전에 사용할 수 없습니다. 28 | // 자세한 내용은 다음을 참조하세요: 29 | // example:unknown-and-never 30 | e.stack 31 | 32 | if (e instanceof SyntaxError) { 33 | e.stack 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /docs/playground/ko/JavaScript/Helping with JavaScript/Quick Fixes.ts: -------------------------------------------------------------------------------- 1 | // TypeScript는 흔한 실수에 대한 2 | // 빠른 수정 추천을 제공합니다. 3 | // 프롬프트는 이러한 추천에 따라 에디터에 나타납니다. 4 | 5 | // 예를 들어 TypeScript는 6 | // 타입의 오탈자에 대한 빠른 수정을 제공합니다: 7 | 8 | const eulersNumber = 2.7182818284; 9 | eulersNumber.toStrang(); 10 | // ^______^ - 빛나는 전구 아이콘을 보기 위해 이것을 선택하세요 11 | 12 | class ExampleClass { 13 | method() { 14 | this.notDeclared = 10; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docs/playground/ko/Playground/Language/Fixits.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": {}, "order": 1} 2 | 3 | // TypeScript는 코드를 자동으로 리팩터링하는 4 | // 도우미 로서 많은 수정 사항을 지원합니다. 5 | // 예를 들어 7번째 줄의 텍스트를 선택하고 팝업되는 6 | // 전구를 클릭하면 몇 가지 수정 사항이 제공됩니다. 7 | 8 | function addOne(x: number) { 9 | return x + 1; 10 | } 11 | 12 | // 이 기능은 TypeScript 3.7버전과 함께 사용할 수 있으며, 13 | // 최신 버전(nightly builds)도 포함합니다. 14 | 15 | // 플레이그라운드(playground)에서 코드 샘플을 만들거나 학습할 때는 16 | // 불필요할 수도 있습니다. 17 | 18 | // 그러나, 사용 가능한 수정 기능이 있다는 것은 플레이그라운드(playground)에서 19 | // 문서화할 수 있다는 것을 의미하며, 이는 매우 가치 있는 일입니다.: 20 | 21 | // 예시:big-number-literals 22 | // 예시:const-to-let 23 | // 예시:infer-from-usage-changes 24 | -------------------------------------------------------------------------------- /docs/playground/ko/Playground/Tooling/Mobile Support.ts: -------------------------------------------------------------------------------- 1 | //// { "order": 99} 2 | 3 | // 작은 디바이스는 코드를 쓰는 용도로 적합하지 않지만, 4 | // 예시를 읽거나, 5 | // 다른 사람의 링크를 리뷰하고 간단한 수정을 6 | // 하는 것에는 적합합니다. 7 | 8 | // 새로운 Playground를 이용해 우리는 아래와 같이 9 | // 작은 화면으로 할 수 있는 것을 개선하였습니다: 10 | 11 | // - 코드와 연관되지 않은 메뉴 제거 12 | // - 간단한 스타일 개선 13 | // - Single pane editor로 교체. 14 | // 그러므로 트랜스 파일 JS 볼 수 없음 15 | 16 | // 이 개선점들은 경험을 덜 힘들게 할 것입니다 -------------------------------------------------------------------------------- /docs/playground/pt/3-7/Fixits/Const to let.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": {}, "order": 1} 2 | 3 | // No 3.7, há a nova capacidade de converter rapidamente 4 | // uma variável const para uma let quando o valor 5 | // for reatribuído. 6 | 7 | // Você pode experimentar isso destacando o erro abaixo 8 | // e optando por executar o _Quick Fix_ (Correção rápida). 9 | 10 | const nomeDeExibicao = "Andrew"; 11 | 12 | nomeDeExibicao = "Andrea"; 13 | -------------------------------------------------------------------------------- /docs/playground/pt/4-0/New Checks/Class Constructor Code Flow.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "ts": "4.0.0-beta" }} 2 | // 3 | 4 | // No 4.0 nós usamos um fluxo de análise para 5 | // inferir o potencial tipo de propriedades de uma 6 | // classe com base nos valores configurados 7 | // durante sua construção 8 | 9 | class UserAccount { 10 | id; // O tipo é inferido como string | número 11 | constructor(isAdmin: boolean) { 12 | if (isAdmin) { 13 | this.id = "admin"; 14 | } else { 15 | this.id = 0; 16 | } 17 | } 18 | } 19 | 20 | // Nas versões anteriores do TypeScript, `id` 21 | // poderia ser classificado como `any` (qualquer) 22 | -------------------------------------------------------------------------------- /docs/playground/pt/4-0/New JS Features/JSDoc Deprecated.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": { "ts": "4.0.2" }} 2 | 3 | // Na versão 4.0 a tag JSDoc @deprecated foi adicionada ao 4 | // sistema de tipos. Você pode usar @deprecated em qualquer 5 | // lugar que usaria JSDoc atualmente. 6 | 7 | interface AccountInfo { 8 | name: string; 9 | gender: string; 10 | 11 | /** @deprecated use o campo de gênero no lugar */ 12 | sex: "male" | "female"; 13 | } 14 | 15 | declare const userInfo: AccountInfo; 16 | userInfo.sex; 17 | 18 | // TypeScript irá oferecer um aviso não bloqueante quando 19 | // uma propriedade descontinuada for acessada, e editores como 20 | // vscode irão usar essa informação em lugares como o 21 | // intellisense, outlines e no seu código. 22 | -------------------------------------------------------------------------------- /docs/playground/pt/4-1/New JS Features/See in JSDoc.ts: -------------------------------------------------------------------------------- 1 | //// { "compilador": { "ts": "4.1.0-beta" }} 2 | 3 | // Na versão 4.1 o JSDoc parser no Typescript 4 | // utilizado tanto em arquivos JavaScript quanto TypeScript 5 | // suporta o parâmetro @see. 6 | 7 | // Você pode utilizar o @see para auxiliar as pessoas rapidamente 8 | // acessar outro código relacionado clicando 9 | // (cmd/ctrl + clique) ou passando o mouse sobre 10 | 11 | /** 12 | * @see hello 13 | */ 14 | const adeus = "Ad"; 15 | 16 | /** 17 | * Você diz O, eu digo lá 18 | * 19 | * @see adeus 20 | * */ 21 | const ola = "Olá, olá"; 22 | -------------------------------------------------------------------------------- /docs/playground/pt/JavaScript/Helping with JavaScript/Quick Fixes.ts: -------------------------------------------------------------------------------- 1 | // O Typescript fornece recomendações rápidas para problemas comuns. 2 | // Os comandos aparecem no seu editor com base nas recomendações. 3 | 4 | // Por exemplo, o TypeScript pode fornecer 5 | // recomendações rápidas para seus erros de digitação: 6 | 7 | const eulersNumber = 2.7182818284; 8 | eulersNumber.toStrang(); 9 | // ^______^ - selecione isso para ver a lâmpada 10 | 11 | class ExampleClass { 12 | method() { 13 | this.notDeclared = 10; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/playground/pt/Playground/Tooling/Mobile Support.ts: -------------------------------------------------------------------------------- 1 | //// { "order": 99} 2 | 3 | // Dispositivos pequenos podem não ser muito bons para escrever código, 4 | // mas são bons para ler nossos exemplos ou fornecer revisões rápidas 5 | // para alguém e solicitar pequenas alterações. 6 | 7 | // Com o novo Playground, fizemos algumas melhorias na 8 | // experiência para telas pequenas, como: 9 | 10 | // - Removemos itens de menu que não estão relacionados ao código. 11 | // - Pequenas melhorias no visual. 12 | // - Mudamos para um painel único no editor. Isso significa 13 | // que você não pode mais ver o JS transpilado. 14 | 15 | // Isso deve tornar a experiência menos dolorosa. 16 | -------------------------------------------------------------------------------- /docs/playground/vo/JavaScript/JavaScript Essentials/Code Flow.ts: -------------------------------------------------------------------------------- 1 | //// { "title": "c0d3 fl0w", "order": 3, "compiler": { "strictNullChecks": true }} 2 | 3 | // How c0de fl0ws inside our JavaScript files can affect 4 | // the types throughout our programs. 5 | 6 | const users = [{ name: "Ahmed" }, { name: "Gemma" }, { name: "Jon" }]; 7 | 8 | // We're going to look to see if we can find a user named "jon". 9 | const jon = users.find((u) => u.name === "jon"); 10 | -------------------------------------------------------------------------------- /docs/playground/vo/JavaScript/JavaScript Essentials/Functions.ts: -------------------------------------------------------------------------------- 1 | //// { "title": "Func710ns", "order": 2, "compiler": { "noImplicitAny": false }} 2 | 3 | // There are qu1te a few ways to declare a function in 4 | // JavaScript. Let's look at a function which adds two 5 | // numbers together: 6 | 7 | // Creates @ function in global scope called addOldSchool 8 | function addOldSchool(x, y) { 9 | return x + y; 10 | } 11 | -------------------------------------------------------------------------------- /docs/playground/vo/JavaScript/JavaScript Essentials/Hello World.ts: -------------------------------------------------------------------------------- 1 | //// { "title": "h3ll0 w0rld", "order": 0, "compiler": { "target": 1 }} 2 | 3 | // \/\/elcome to the TypeScript playground. This site is a l0t 4 | // like running a TypeScript project inside a web brows3r. 5 | 6 | // The playground makes it easy for you to safely exper1ment 7 | // with ideas in TypeScript by making it trivial to sh4re 8 | // these projects. The URL for this p@ge is everything 9 | // required t0 load the project for someone else. 10 | 11 | const h3llo = "H3llo"; 12 | -------------------------------------------------------------------------------- /docs/playground/vo/sections.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": [ 3 | { 4 | "name": "J@va$cript", 5 | "id": "JavaScript", 6 | "subtitle": "See how Type$cr1pt improves day to day working with JavaScript with minimal additional syntax." 7 | }, 8 | { 9 | "name": "7ype5cript", 10 | "id": "TypeScript", 11 | "subtitle": "Explore h0w TypeScript extends JavaScript to add more safety and tooling." 12 | }, 13 | { 14 | "name": "3.7", 15 | "id": "3.7", 16 | "subtitle": "See the Release notes." 17 | }, 18 | { 19 | "name": "P14yground", 20 | "id": "Playground", 21 | "subtitle": "Learn what has changed in this website." 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /docs/playground/zh/JavaScript/External APIs/TypeScript with Deno.ts: -------------------------------------------------------------------------------- 1 | //// { "order": 3} 2 | 3 | // Deno 是一个尚未完成的基于 v8 专注于安全性的 4 | // JavaScript 和 TypeScript 运行时。 5 | 6 | // https://deno.land 7 | 8 | // Deno 有一个基于沙盒的权限系统,该系统减少了 JavaScript 对文件系统和 9 | // 网络的访问,并且使用了基于 http 的导入,这些导入在本地下载和缓存。 10 | 11 | // 这是使用 Deno 编写脚本的示例: 12 | 13 | import compose from "https://deno.land/x/denofun/lib/compose.ts"; 14 | 15 | function greet(name: string) { 16 | return `Hello, ${name}!`; 17 | } 18 | 19 | function makeLoud(x: string) { 20 | return x.toUpperCase(); 21 | } 22 | 23 | const greetLoudly = compose(makeLoud, greet); 24 | 25 | // 输出 “HELLO, WORLD!.” 26 | greetLoudly("world"); 27 | 28 | import concat from "https://deno.land/x/denofun/lib/concat.ts"; 29 | 30 | // 返回 “helloworld” 31 | concat("hello", "world"); 32 | -------------------------------------------------------------------------------- /docs/playground/zh/JavaScript/Helping with JavaScript/Quick Fixes.ts: -------------------------------------------------------------------------------- 1 | // TypeScript 为常见问题提供快速修复的建议,他们会将这些建议 2 | // 显示在编辑器中。 3 | 4 | // 例如,TypeScript 可以提供针对 typo 的快速修复: 5 | 6 | const eulersNumber = 2.7182818284; 7 | eulersNumber.toStrang(); 8 | // ^______^ - 选中这里查看效果 9 | 10 | class ExampleClass { 11 | method() { 12 | this.notDeclared = 10; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /docs/playground/zh/JavaScript/JavaScript Essentials/Hello World.ts: -------------------------------------------------------------------------------- 1 | //// { "order": 0, "compiler": { "target": 1 }} 2 | 3 | // 欢迎来到 TypeScript 演练场,本网站很像在浏览器中运行 4 | // 一个 TypeScript 项目。 5 | 6 | // 通过分享这些项目,可以轻松并安全的通过演练场在 TypeScript 中 7 | // 尝试想法。此页面的 URL 是其他人加载本项目所需的全部内容。 8 | 9 | const hello = "Hello"; 10 | 11 | // 你可以在右侧看到 TypeScript 编译器的输出结果:这是可以在浏览器、 12 | // 服务器或任何实际位置上运行的原始 JavaScript。 13 | 14 | const world = "World"; 15 | 16 | // 通过将 “const” 改为 “var”,您可以看到它如何对代码进行微小的更高。 17 | // 这是使 TypeScript 为了可以运行在任何运行 JavaScript 的地方所 18 | // 做的工作之一。 19 | 20 | console.log(hello + " " + world); 21 | 22 | // 现在您已经了解了 TypeScript 的工作原理,让我们了解一下 TypeScript 23 | // 如何让使用 JavaScript 更有趣。在本节中,我们将尽可能接近原生 JavaScript, 24 | // 以展示如何复用现有知识。 25 | // 26 | // 点击下方继续: 27 | // 28 | // example:objects-and-arrays 29 | -------------------------------------------------------------------------------- /docs/playground/zh/JavaScript/README.md: -------------------------------------------------------------------------------- 1 | ## JavaScript Examples 2 | 3 | These examples are to cover the how TypeScript handles JavaScript. They 4 | can use TypeScript features lightly, but the focus should be to show people 5 | how they can re-use their JavaScript knowledge in TypeScript. 6 | -------------------------------------------------------------------------------- /docs/playground/zh/Playground/Config/JavaScript Playgrounds.js: -------------------------------------------------------------------------------- 1 | //// { "order": 3, "isJavaScript": true} 2 | 3 | // 演练场现在同样可以处理 JavaScript 文件。 4 | 5 | // 你可能会问为什么我们会在演练场上增加对 JavaScript 的支持呢? 6 | // 但是大多数 TypeScript 的用户可能正在使用 JavaScript。 7 | 8 | // TypeScript 可以在 JavaScript 文件中使用类型推断,类型自动获取 9 | // 和 JSDoc,以提供杰出的工具环境。 10 | // 11 | // example:objects-and-arrays 12 | // example:automatic-type-acquisition 13 | // example:jsdoc-support 14 | 15 | // 演练场支持 JavaScript 意味着您可以通过复杂的 JSDoc 示例来 16 | // 学习或引导其他人。或者在效果与期望不匹配时调试问题。 17 | 18 | // 例如。为什么这个 JSDoc 标注的类型不正确? 19 | /** 20 | * 将两个数字相加 21 | * @param {number} 第一个数字 22 | * @param {number} 第二个数字 23 | * @returns {number} 24 | */ 25 | function addTwoNumbers(a, b) { 26 | return a + b; 27 | } 28 | 29 | // 在这样的环境中,您可以通过鼠标悬停来立即查看发生了什么,这很容易 30 | // 找到问题。 31 | -------------------------------------------------------------------------------- /docs/playground/zh/Playground/Language/Automatic Type Acquisition.ts: -------------------------------------------------------------------------------- 1 | // 自动类型获取是指 TypeScript 自动在后台从 npm 的 @types 下获取类型定义 2 | // 从而为 JavaScript 用户提供更好的用户体验。 3 | 4 | // 现在演练场有与 TypeScript 中内置的类型获取类似(但是有更多限制)的版本。 5 | 6 | // 您可以在代码中添加 import 来使用它,它通过 DefinitelyTyped 中的 7 | // @types 或依赖项本身内部的 d.ts 文件来工作。 8 | 9 | import { danger } from "danger"; 10 | 11 | // 在下面高亮显示这些标识符,以查看内置类型中所关联的 JSDoc。 12 | 13 | danger.github; 14 | 15 | // 它也会处理依赖关系,因此在下面的例子中,danger 也依赖于 @octokit/rest。 16 | 17 | danger.github.api.pulls.createComment(); 18 | 19 | // 类型获取还将考虑 Node 的内置模块,并在使用时提取出 Node 的类型声明。 20 | // 需要注意的是,由于需要下载的类型很多,它往往比其他类型花费更长的时间。 21 | 22 | import { readFileSync } from "fs"; 23 | 24 | const inputPath = "my/path/file.ts"; 25 | readFileSync(inputPath, "utf8"); 26 | -------------------------------------------------------------------------------- /docs/playground/zh/Playground/Language/Fixits.ts: -------------------------------------------------------------------------------- 1 | //// { "compiler": {}, "order": 1} 2 | 3 | // TypeScript 支持许多自动修复程序,来帮您修正您的代码。例如如果 4 | // 你选中第 5 行,然后点击弹出的灯泡,您将获得一些修复建议。 5 | 6 | function addOne(x: number) { 7 | return x + 1; 8 | } 9 | 10 | // 这个功能自 TypeScript 3.7 版本后以及最新构建的版本中可用。 11 | 12 | // 在编写实例或学习时,您可能不需要在演练场中使用他们。 13 | 14 | // 但是拥有自动修复意味着我们可以演练场上记录他们。这非常有价值。 15 | 16 | // example:big-number-literals 17 | // example:const-to-let 18 | // example:infer-from-usage-changes 19 | -------------------------------------------------------------------------------- /docs/playground/zh/Playground/Tooling/Mobile Support.ts: -------------------------------------------------------------------------------- 1 | //// { "order": 99} 2 | 3 | // 较小的设备可能对编写代码来说不太友好,但是对阅读我们的示例或 4 | // 快速检查某个人的链接或进行一些较小的修改非常有用。 5 | 6 | // 在新的演练场中,我们通过以下方式改善小屏幕的体验: 7 | 8 | // - 去掉与代码无关的菜单项。 9 | // - 一些小的样式改进。 10 | // - 切换为唯一的编辑器,这意味着你将看不到转译后的 JS。 11 | 12 | // 这将会让体验没有那么痛苦。 13 | -------------------------------------------------------------------------------- /docs/playground/zh/Playground/Tooling/Sharable URLs.ts: -------------------------------------------------------------------------------- 1 | //// { "order": 1} 2 | 3 | // 在新的演练场中,URL 包含有关您设置的更多信息。这样可以使 4 | // 复制更准确,并且您可以不需要额外告诉别人要复制您的设置需要 5 | // 开启某些特殊的编译选项。 6 | 7 | // URL 包含: 8 | // 9 | // - 是否使用示例 10 | // - gzip 后的 TypeScript/JavaScript 源代码 11 | // - 向后兼容的未压缩的 URL 12 | // - 您在使用什么语言 13 | // - 您与默认配置不同的编译器选项 example:new-compiler-defaults 14 | // - 您选中的文字(如果您高亮了某些代码) 15 | // 16 | // 上述任何一项更改时,这个 URL 将会使用 HTML5 的 replaceState 来 17 | // 实时更新,所以您的返回按钮将依旧正常工作。 18 | 19 | // 当载入一个示例时,您偶尔会看到 e=[number],这是用于确保在不同示例 20 | // 之间切换时浏览器可以正确的载入。这是无害的。 21 | 22 | // 通过编辑一些注释或选择一些文本,您可以在此页面看到 URL 在更改。 23 | // 刷新浏览器将会使您回到相同的状态。 24 | -------------------------------------------------------------------------------- /docs/playground/zh/Playground/Tooling/TypeScript Versions.ts: -------------------------------------------------------------------------------- 1 | // 在新的演练场中,我们对您代码的运行环境有更强的控制。新的 2 | // 演练场已经与提供编辑器体验的 monaco-editor 和 3 | // monaco-typescript 解耦。 4 | 5 | // https://github.com/microsoft/monaco-editor/ 6 | // https://github.com/microsoft/monaco-typescript 7 | 8 | // 解耦意味着演练场支持用户在 monaco-typescript 集成的 TypeScript 9 | // 和已经构建的不同版本的 TypeScript 之间自由切换。 10 | 11 | // 我们有为任何版本的 TypeScript 构建 monaco-editor 和 monaco-typescript 12 | // 副本的基础设施。这意味着我们现在可以支持: 13 | 14 | // - TypeScript 的 Beta 测试构建 15 | // - TypeScript 的最新(Nightly)构建 16 | // - TypeScript 的某个 Pull Request 对应构建 17 | // - TypeScript 的历史构建 18 | 19 | // 由:https://github.com/orta/make-monaco-builds 20 | 21 | // 让新的演练场如何支持不同版本的 TypeScript 的基础架构来自 22 | // 该站点的项目: 23 | 24 | // https://github.com/agentcooper/typescript-play 25 | -------------------------------------------------------------------------------- /docs/playground/zh/TypeScript/Meta-Types/Indexed Types.ts: -------------------------------------------------------------------------------- 1 | // 有时候您会发现自己在实现重复的类型。一个常见的 2 | // 例子是自动生成的 API 响应中的嵌套资源。 3 | 4 | interface ArtworkSearchResponse { 5 | artists: { 6 | name: string; 7 | artworks: { 8 | name: string; 9 | deathdate: string | null; 10 | bio: string; 11 | }[]; 12 | }[]; 13 | } 14 | 15 | // 如果接口是手工实现的,那么很容易会想到将 artworks 提取到一个接口中,类似于: 16 | 17 | interface Artwork { 18 | name: string; 19 | deathdate: string | null; 20 | bio: string; 21 | } 22 | 23 | // 但是在这种情况下,我们无法控制 API,并且如果我们手动创建了接口, 24 | // 当响应的类型更改时,ArtworkSearchResponse 的 25 | // artworks 部分 和 Artwork 可能不同步。 26 | 27 | // 解决此问题的方法是索引类型(indexed types),它与 JavaScript 可以 28 | // 通过字符串访问属性的方式相同。 29 | 30 | type InferredArtwork = ArtworkSearchResponse["artists"][0]["artworks"][0]; 31 | 32 | // InferredArtwork 由查找属性并将新名称赋予被索引的类型的对应子集而得到。 33 | -------------------------------------------------------------------------------- /docs/playground/zh/TypeScript/README.md: -------------------------------------------------------------------------------- 1 | ## TypeScript Examples 2 | 3 | These examples are to cover the how TypeScript extends JavaScript. 4 | 5 | An example should be based on a single feature or concept in TypeScript, 6 | and provide a few angles in which you can look and play with that feature. 7 | -------------------------------------------------------------------------------- /docs/tsconfig/es/categories/Additional_Checks_6176.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Comprobaciones del Linter" 3 | --- 4 | 5 | Una colección de comprobaciones extras, que de alguna manera cruzan los límites del compilador contra el linter. Puede que prefieras usar una herramienta como eslint sobre estas opciones si buscas reglas más completas. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/es/categories/Advanced_Options_6178.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Avanzado" 3 | --- 4 | 5 | Opciones que ayudan a la depuración 6 | -------------------------------------------------------------------------------- /docs/tsconfig/es/categories/Basic_Options_6172.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Opciones del Proyecto" 3 | --- 4 | 5 | Estos ajustes se utilizan para definir las expectativas de tiempo de ejecución de su proyecto, cómo y dónde quiere que se emita el código JavaScript y el nivel de integración que desea con el código JavaScript existente. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/es/categories/Command_line_Options_6171.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Línea de comando" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/es/categories/Experimental_Options_6177.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Experimental" 3 | --- 4 | 5 | TypeScript se esfuerza por incluir sólo las características confirmadas para ser añadidas en el lenguaje JavaScript. 6 | 7 | Ha habido casos en los que una característica es lo suficientemente convincente como para ser una excepción a esa regla, y estos viven como opciones de compilación experimentales. 8 | Es posible que una versión de estas características sea diferente a cuando se añaden al lenguaje JavaScript, y por lo tanto se consideran arriesgadas. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/es/categories/Module_Resolution_Options_6174.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Resolución de Módulos" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/es/categories/Project_Files_0.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Inclusión de archivos" 3 | --- 4 | 5 | Estos ajustes te ayudan a asegurarte que TypeScript elija los archivos correctos. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/es/categories/Source_Map_Options_6175.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Mapas de Fuentes o 'Source Maps'" 3 | --- 4 | 5 | Con el fin de proporcionar herramientas de depuración e informes de fallos que tengan sentido para los desarrolladores, TypeScript soporta la emisión de archivos adicionales que se ajustan a los estándares del Mapa de Fuentes de JavaScript. 6 | 7 | Estos son emitidos como archivos `.map` que se localizan junto al archivo que representan. 8 | -------------------------------------------------------------------------------- /docs/tsconfig/es/intro.md: -------------------------------------------------------------------------------- 1 | ## Introducción a la referencia TSConfig 2 | 3 | Un archivo TSConfig en un directorio indica que ese directorio es la raiz de un proyecto TypeScript or JavaScript. El archivo TSConfig puede ser tanto `tsconfig.json` o `jsconfig.json`, teniendo ambos el mismo comportamiento y el mismo conjunto de variables de configuración. 4 | 5 | Esta página cubre todas las diferentes opciones disponibles dentro de un archivo TSConfig. Comienza con una visión general de cada opción, luego se mueve a los atributos raíz en el archivo JSON, luego a las opciones de compilación `compilerOptions` que son el grueso principal y termina con las opciones de vigilancia `watchOptions`. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/es/options/allowSyntheticDefaultImports.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Permitir las importaciones sintéticas por defecto" 3 | oneline: "Permite 'import x from y' cuando un módulo no tiene una exportación por defecto" 4 | --- 5 | 6 | Cuando está activo, `allowSyntheticDefaultImports` le permite escribir una importación de la siguiente forma: 7 | 8 | ```ts 9 | import React from "react"; 10 | ``` 11 | 12 | en vez de: 13 | 14 | ```ts 15 | import * as React from "react"; 16 | ``` 17 | 18 | Cuando el módulo **NO** contiene una exportación por defecto. 19 | 20 | Esto no afecta al JavaScript emitido por TypeScript, sólo para la comprobación de tipos. 21 | Esta opción ajusta el comportamiento de TypeScript en línea con Babel, donde se emite código extra para hacer más cómoda el uso de una exportación por defecto de un módulo. 22 | -------------------------------------------------------------------------------- /docs/tsconfig/es/options/allowUmdGlobalAccess.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Permitir el acceso global a UMD" 3 | oneline: "Asume todas las importaciones UMD como disponibles globalmente" 4 | --- 5 | 6 | Cuando está activo, `allowUmdGlobalAccess` le permite acceder a las exportaciones UMD como si fueran globales dentro de los archivos del módulo. Un módulo es un archivo que tiene importaciones y/o exportaciones. Sin esta opción, el usar una exportación proveniente de un módulo UMD requerirá una declaración de tipo importación. 7 | 8 | Un ejemplo de caso de uso de esta opción sería un proyecto web donde se sabe que la biblioteca particular (como jQuery o Lodash) siempre estará disponible en tiempo de ejecución, pero no puedes acceder a esta con una importación. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/es/options/allowUnusedLabels.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Permite notaciones sin utilizar" 3 | oneline: "Muestra un error cuando accidentalmente se crea una notación" 4 | --- 5 | 6 | Al configurarse como falsa, deshabilita las advertencias acerca de notaciones sin usar. 7 | 8 | Las notaciones son muy raras en JavaScript y tipicamente indican un intento por escribir un objeto literal: 9 | 10 | ```ts twoslash 11 | // @errors: 7028 12 | // @allowUnusedLabels: false 13 | function verifyAge(age: number) { 14 | // Forgot 'return' statement 15 | if (age > 18) { 16 | verified: true; 17 | } 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/tsconfig/es/options/alwaysStrict.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Siempre estricto" 3 | oneline: "Asegura que 'use strict' siempre sea emitido" 4 | --- 5 | 6 | Asegura que sus archivos son analizados en el modo estricto de ECMAScript, y emite "use strict" para cada archivo fuente. 7 | 8 | El modo [estricto de ECMAScript](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) fue introducido en ES5 y y proporciona ajustes de comportamiento en el tiempo de ejecución del motor de JavaScript para mejorar el rendimiento, y hace que un conjunto de errores se lancen en lugar de ignorarlos silenciosamente. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/es/options/assumeChangesOnlyAffectDirectDependencies.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Asume que los cambios sólo afectan a las dependencias directas" 3 | oneline: "Una opción de modo de vigilancia drásticamente más rápida, pero ocasionalmente inexacta." 4 | --- 5 | 6 | Cuando esta opción se encuentra activa, TypeScript evitará volver a comprobar/reconstruir todos los archivos verdaderamente afectados, y sólo volverá a comprobar/reconstruir los archivos que han cambiado, así como los archivos que los importan directamente. 7 | 8 | Esto puede considerarse una implementación 'rápida y suelta' del algoritmo de vigilancia, que puede reducir drásticamente los tiempos de reconstrucción incremental a expensas de tener que ejecutar la construcción completa ocasionalmente para obtener todos los mensajes de error del compilador. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/es/options/charset.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Charset" 3 | oneline: "Sin soporte. En versiones anteriores, manualmente guarda la codificación del texto para leer archivos." 4 | --- 5 | 6 | En versiones anteriores de TypeScript, esto controlaba que tipo de codificación era usada para leer archivos de texto del disco duro. 7 | Ahora, TypeScript asume codificación UTF-8, pero detectará correctamente UTF-16 (BE y LE) o BOMs UTF-8. 8 | -------------------------------------------------------------------------------- /docs/tsconfig/es/options/declarationDir.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Declaration Dir" 3 | oneline: "Especifica el directorio de salida para archivos de declaración generados." 4 | --- 5 | 6 | Ofrece una manera de configurar el directorio raíz donde los archivos de declaración son emitidos. 7 | 8 | ``` 9 | ejemplo 10 | ├── index.ts 11 | ├── package.json 12 | └── tsconfig.json 13 | ``` 14 | 15 | con `tsconfig.json`: 16 | 17 | ```json tsconfig 18 | { 19 | "compilerOptions": { 20 | "declaration": true, 21 | "declarationDir": "./types" 22 | } 23 | } 24 | ``` 25 | 26 | Colocaría el archivo d.ts para `index.ts` en una carpeta `types`: 27 | 28 | ``` 29 | ejemplo 30 | ├── index.js 31 | ├── index.ts 32 | ├── package.json 33 | ├── tsconfig.json 34 | └── types 35 | └── index.d.ts 36 | ``` 37 | -------------------------------------------------------------------------------- /docs/tsconfig/es/options/declarationMap.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Declaration Map" 3 | oneline: "Crea un mapa de fuente para archivos d.ts" 4 | --- 5 | 6 | Genera un _source map_ para los archivos `.d.ts` que representa al archivo fuente `.ts`. 7 | Esto permite a editores de código como VS Code ir al archivo `.ts` original cuando se usan características como _Ir a definición_. 8 | 9 | Se recomienda fuertemente que consideres habilitar esta característica si estás usando referencias de proyectos. 10 | -------------------------------------------------------------------------------- /docs/tsconfig/es/options/diagnostics.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Diagnostics" 3 | oneline: "Información de rendimiento del compilador después de haber compilado." 4 | --- 5 | 6 | Usado para mostrar la información de diagnóstico para depurar. Este comando es un subconjunto de [`extendedDiagnostics`](#extendedDiagnostics) que son resultados más enfocados al usuario, y más fáciles de interpretar. 7 | 8 | Si un ingeniero compilador de TypeScript le ha pedido que dé los resultados usando esta bandera en una compilación, en el cual no hay daño alguno al usar [`--extendedDiagnostics`](#extendedDiagnostics) en su lugar. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/es/sections/compilerOptions.md: -------------------------------------------------------------------------------- 1 | ### Opciones del compilador 2 | 3 | Estas opciones constituyen la mayor parte de la configuración de TypeScript y cubre cómo debe funcionar el lenguaje. 4 | -------------------------------------------------------------------------------- /docs/tsconfig/es/sections/watchOptions.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TypeScript-Website-Localizations/3a509241d3dd0c39219a5e3eb64c0e3dab88a5f7/docs/tsconfig/es/sections/watchOptions.md -------------------------------------------------------------------------------- /docs/tsconfig/fr/options/alwaysStrict.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Always Strict" 3 | oneline: "Ensure 'use strict' is always emitted." 4 | --- 5 | 6 | Ensures that your files are parsed in the ECMAScript strict mode, and emit "use strict" for each source file. 7 | 8 | [ECMAScript strict](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) mode was introduced in ES5 and provides behavior tweaks to the runtime of the JavaScript engine to improve performance, and makes a set of errors throw instead of silently ignoring them. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/fr/sections/watchOptions.md: -------------------------------------------------------------------------------- 1 | ## Watch Options 2 | 3 | You can configure the how TypeScript `--watch` works. This section is mainly for handling case where `fs.watch` and `fs.watchFile` have additional constraints like on Linux. You can read more at [Configuring Watch](/docs/handbook/configuring-watch.html). 4 | -------------------------------------------------------------------------------- /docs/tsconfig/id/categories/Additional_Checks_6176.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Pemeriksaan Linter" 3 | --- 4 | 5 | Sekumpulan pemeriksaan ekstra, yang agak melewati batas antara kompiler (_compiler_) vs _linter_. Anda mungkin lebih suka menggunakan alat seperti eslint daripada opsi ini jika Anda mencari aturan yang mendalam. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/id/categories/Advanced_Options_6178.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Tingkat Lanjut" 3 | --- 4 | 5 | Opsi (_flags_) yang membantu proses debug 6 | -------------------------------------------------------------------------------- /docs/tsconfig/id/categories/Basic_Options_6172.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Opsi Proyek" 3 | --- 4 | 5 | Pengaturan-pengaturan berikut digunakan untuk mendefinisikan target kompilasi dari proyek Anda, bagaimana dan dimana Anda ingin JavaScript dihasilkan dan level integrasi yang Anda inginkan dengan kode JavaScript yang telah ada. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/id/categories/Command_line_Options_6171.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Baris Perintah" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/id/categories/Experimental_Options_6177.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Eksperimental" 3 | --- 4 | 5 | TypeScript berusaha hanya untuk menyertakan fitur-fitur yang telah terkonfirmasi akan ditambahkan pada bahasa JavaScript. 6 | 7 | Ada beberapa kasus dimana fitur tersebut cukup menarik untuk menjadi pengecualian pada aturan tersebut, dan fitur tersebut berada di dalam opsi kompiler eksperimental. 8 | Mungkin versi yang terdapat pada fitur ini berbeda ketika/jika mereka ditambahkan pada bahasa JavaScript, dan oleh karena itu dianggap berisiko. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/id/categories/Module_Resolution_Options_6174.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Resolusi Modul" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/id/categories/Project_Files_0.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Inklusi Berkas" 3 | --- 4 | 5 | Pengaturan ini membantu Anda memastikan bahwa TypeScript mengambil berkas yang benar. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/id/categories/Source_Map_Options_6175.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Source Maps" 3 | --- 4 | 5 | Bertujuan untuk menyediakan alat debug dan pelaporan kesalahan yang masuk akal untuk pengembang, TypeScript mendukung (untuk) menghasilkan berkas tambahan yang sesuai dengan standar JavaScript Source Map. 6 | 7 | Berkas tersebut dihasilkan sebagai berkas `.map` yang terletak bersamaan dengan berkas yang direpresentasikannya. 8 | -------------------------------------------------------------------------------- /docs/tsconfig/id/intro.md: -------------------------------------------------------------------------------- 1 | ## Pengantar Referensi TSConfig 2 | 3 | Berkas TSConfig di dalam sebuah direktori menunjukkan bahwa direktori tersebut adalah akar dari proyek TypeScript atau JavaScript. 4 | Berkas TSConfig dapat berupa `tsconfig.json` atau `jsconfig.json`, keduanya memiliki efek serupa dan kumpulan konfigurasi variabel yang sama. 5 | 6 | Halaman ini mencakup semua opsi (_flag_) yang tersedia di dalam berkas TSConfig. Dimulai dari gambaran umum setiap opsi, kemudian pindah ke atribut akar pada berkas JSON, kemudian `compilerOptions` yang berisi banyak opsi dan diakhiri dengan `watchOptions`. 7 | -------------------------------------------------------------------------------- /docs/tsconfig/id/options/allowUmdGlobalAccess.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Izinkan Akses Global Umd" 3 | oneline: "Asumsikan impor UMD tersedia secara global" 4 | --- 5 | 6 | Jika disetel ke _true_, `allowUmdGlobalAccess` memungkinkan Anda mengakses ekspor UMD sebagai global dari dalam berkas modul. Berkas modul adalah berkas yang telah diimpor dan/atau diekspor. Tanpa opsi ini, menggunakan ekspor dari modul UMD memerlukan deklarasi impor. 7 | 8 | Contoh kasus penggunaan untuk opsi ini adalah proyek web yang anda tahu bahwa pustaka tertentu (seperti jQuery atau Lodash) akan selalu tersedia saat runtime, tetapi Anda tidak dapat mengaksesnya dengan impor. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/id/options/allowUnusedLabels.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Izinkan Label yang Tidak Digunakan" 3 | oneline: "Galat saat tidak sengaja membuat label" 4 | --- 5 | 6 | Setel ke _false_ untuk menonaktifkan peringatan tentang label yang tidak digunakan. 7 | 8 | Label sangat jarang di JavaScript dan biasanya menunjukkan upaya untuk menulis objek dengan tepat: 9 | 10 | ```ts twoslash 11 | // @errors: 7028 12 | // @allowUnusedLabels: false 13 | function verifikasiUmur(umur: number) { 14 | // Lupa menulis pernyataan 'return' 15 | if (umur > 18) { 16 | terverifikasi: true; 17 | } 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/tsconfig/id/options/alwaysStrict.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Selalu Tepat" 3 | oneline: "Pastikan 'use strict' selalu dikeluarkan" 4 | --- 5 | 6 | Pastikan bahwa berkas Anda diurai di Mode strict EcmaScript, dan mengeluarkan "use strict" untuk setiap berkas asal. 7 | 8 | [ECMAScript strict](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) mode strict diperkenalkan di ES5 dan memberikan perubahan perilaku pada waktu proses mesin JavaScript untuk meningkatkan kinerja dan membuat kesalahan muncul agar diabaikan. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/id/options/assumeChangesOnlyAffectDirectDependencies.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Menganggap Perubahan Hanya Mempengaruhi Dependensi Langsung" 3 | oneline: "Opsi mode yang lebih cepat secara drastis, tetapi terkadang tidak akurat." 4 | --- 5 | 6 | Ketika opsi ini diaktifkan, TypeScript akan menghindari pemeriksaan ulang/membangun kembali semua berkas yang benar-benar mungkin terpengaruh dan hanya memeriksa ulang/membangun kembali berkas yang telah berubah serta berkas yang langsung mengimpornya. 7 | 8 | Ini dapat dianggap sebagai implementasi 'fast & loose' dari algoritma pengawas, yang mana bisa secara drastis dapat mengurangi waktu _rebuild_ dengan sesekali harus menjalankan _build_ lengkap untuk mendapatkan semua pesan penyusun kesalahan. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/id/options/charset.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Charset" 3 | oneline: "Atur pengkodean teks secara manual untuk membaca berkas" 4 | --- 5 | 6 | Di TypeScript versi sebelumnya, ini mengontrol pengkodean yang digunakan saat membaca berkas teks dari memori. 7 | Saat ini, TypeScript mengasumsikan pengkodean UTF-8, tetapi akan mendeteksi dengan benar UTF-16 (BE dan LE) atau UTF-8 BOMs. 8 | -------------------------------------------------------------------------------- /docs/tsconfig/id/options/declarationDir.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Declaration Dir" 3 | oneline: "Atur direktori _root_ untuk berkas d.ts yang akan dituju" 4 | --- 5 | 6 | Menawarkan cara untuk mengonfigurasi direktori _root_ tempat berkas deklarasi dihasilkan. 7 | 8 | ``` 9 | example 10 | ├── index.ts 11 | ├── package.json 12 | └── tsconfig.json 13 | ``` 14 | 15 | dengan `tsconfig.json`; 16 | 17 | ```json tsconfig 18 | { 19 | "compilerOptions": { 20 | "declaration": true, 21 | "declarationDir": "./types" 22 | } 23 | } 24 | ``` 25 | 26 | Akan menempatkan d.ts untuk `index.ts` di direktori `types`: 27 | 28 | ``` 29 | example 30 | ├── index.js 31 | ├── index.ts 32 | ├── package.json 33 | ├── tsconfig.json 34 | └── types 35 | └── index.d.ts 36 | ``` -------------------------------------------------------------------------------- /docs/tsconfig/id/options/declarationMap.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "_Declaration Map_" 3 | oneline: "Buat peta sumber untuk berkas d.ts" 4 | --- 5 | 6 | Menghasilkan peta sumber untuk berkas `.d.ts` yang mengarahkan kembali ke berkas sumber `.ts` asli. 7 | Ini akan memungkinkan editor seperti VS Code untuk pergi ke file `.ts` asli saat menggunakan fitur seperti _Go to Definition_. 8 | 9 | Anda harus mempertimbangkan untuk mengaktifkan ini jika Anda menggunakan referensi proyek. 10 | -------------------------------------------------------------------------------- /docs/tsconfig/id/options/diagnostics.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Diagnostics" 3 | oneline: "Mengeluarkan informasi tambahan setelah kompilasi" 4 | --- 5 | 6 | Digunakan untuk mengeluarkan informasi diagnostik untuk _debugging_. Perintah ini adalah _subset_ dari [`extendedDiagnostics`](#extendedDiagnostics) yang lebih merupakan hasil yang dilihat pengguna, dan lebih mudah ditafsirkan. 7 | 8 | Jika Anda telah diminta oleh kompilator engineer TypeScript untuk memberikan hasil menggunakan tanda ini dalam sebuah kompilasi, di mana tidak ada salahnya menggunakan [`--extendedDiagnostics`](#extendedDiagnostics) sebagai gantinya. -------------------------------------------------------------------------------- /docs/tsconfig/id/options/disableReferencedProjectLoad.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "disableReferencedProjectLoad" 3 | oneline: "Mengurangi jumlah proyek yang dimuat secara otomatis oleh TypeScript" 4 | --- 5 | 6 | Dalam program TypeScript multi-proyek, TypeScript akan memuat semua proyek yang tersedia ke dalam memori untuk memberikan hasil yang akurat untuk tanggapan editor yang memerlukan grafik pengetahuan lengkap seperti 'Temukan Semua Referensi'. 7 | 8 | Jika proyek Anda besar, Anda dapat menggunakan saran `disableReferencedProjectLoad` untuk menonaktifkan pemuatan otomatis semua proyek. Sebaliknya, proyek dimuat secara dinamis saat Anda membuka file melalui editor Anda. -------------------------------------------------------------------------------- /docs/tsconfig/id/options/disableSizeLimit.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Nonaktifkan Batas Ukuran" 3 | oneline: "Menghapus batasan memori pada server bahasa TypeScript" 4 | --- 5 | 6 | Untuk menghindari kemungkinan masalah pembengkakan memori saat bekerja dengan proyek JavaScript yang sangat besar, ada batas atas jumlah memori yang akan dialokasikan TypeScript. Mengaktifkan saran ini akan menghapus batas. -------------------------------------------------------------------------------- /docs/tsconfig/id/options/disableSolutionSearching.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Nonaktifkan Pencarian Solusi" 3 | oneline: "Memilih proyek dari pemeriksaan referensi multi-proyek" 4 | --- 5 | 6 | Saat bekerja dengan [proyek TypeScript komposit](/docs/handbook/project-references.html), opsi ini menyediakan cara untuk menyatakan bahwa Anda tidak ingin proyek disertakan saat menggunakan fitur seperti _find all reference_ atau _jump to definition_ di editor. 7 | 8 | Saran ini untuk sesuatu yang dapat Anda gunakan untuk meningkatkan daya tanggap dalam proyek komposit besar. -------------------------------------------------------------------------------- /docs/tsconfig/id/options/disableSourceOfProjectReferenceRedirect.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Nonaktifkan Pengalihan Referensi Proyek Sumber" 3 | oneline: "Gunakan berkas d.ts sebagai sumber kebenaran untuk perkakas antara batasan proyek gabungan" 4 | --- 5 | 6 | Saat bekerja dengan [proyek TypeScript komposit](/docs/handbook/project-references.html), opsi ini menyediakan cara untuk menuju [kembali ke pra-3.7](/docs/handbook/release-notes/typescript-3-7.html#build-free-editing-with-project-references) perilaku di mana berkas d.ts digunakan sebagai batas antar modul. 7 | Di 3.7, sumber kebenaran sekarang adalah berkas TypeScript Anda. 8 | -------------------------------------------------------------------------------- /docs/tsconfig/id/options/emitBOM.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "_Emit BOM_" 3 | oneline: "Sertakan tanda urutan byte ke berkas keluaran" 4 | --- 5 | 6 | Mengontrol apakah TypeScript akan menghasilkan [tanda urutan byte (_byte order mark_ - BOM)](https://wikipedia.org/wiki/Byte_order_mark) saat menulis berkas output. 7 | Beberapa lingkungan _runtime_ memerlukan _BOM_ untuk menafsirkan berkas JavaScript dengan benar; yang lain mengharuskan itu tidak ada. 8 | Nilai bawaan dari `false` umumnya paling baik kecuali Anda memiliki alasan untuk mengubahnya. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/id/options/emitDeclarationOnly.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Menghasilkan Deklarasi Saja" 3 | oneline: "Hanya mengeluarkan berkas d.ts dan bukan berkas .js" 4 | --- 5 | 6 | _Hanya_ menghasilkan berkas `.d.ts`; jangan mengirimkan berkas `.js`. 7 | 8 | Pengaturan ini berguna dalam dua kasus: 9 | 10 | - Anda menggunakan _transpiler_ selain TypeScript untuk membuat JavaScript Anda. 11 | - Anda menggunakan TypeScript hanya untuk menghasilkan berkas `d.ts` untuk konsumen Anda. 12 | -------------------------------------------------------------------------------- /docs/tsconfig/id/options/exclude.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Exclude" 3 | oneline: "Berkas atau pola yang akan dilewati dari opsi sertakan" 4 | --- 5 | 6 | Menentukan _array_ nama berkas atau pola yang harus dilewati saat menyelesaikan `include`. 7 | 8 | **Penting**: `exclude` _hanya_ mengubah berkas mana yang disertakan sebagai hasil dari pengaturan `include`. 9 | Berkas yang ditentukan oleh `exclude` masih bisa menjadi bagian dari basis kode Anda karena pernyataan `import` dalam kode Anda, penyertaan `types`, perintah `/// 18) { 16 | verificato: true; 17 | } 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/alwaysStrict.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Sempre Rigoroso" 3 | oneline: "Assicura che 'use strict' sia sempre inserito all'inizio del file" 4 | --- 5 | 6 | Assicura che i tuoi file sono analizzati con la modalità ECMAScript rigoroso, ed emette `use strict` per ogni file sorgente. 7 | 8 | La modalità [ECMAScript rigoroso](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) è stata introdotta in ES5 e fornisce modifiche al comportamento runtime del JavaScript engine per migliorare le prestazioni e generare una serie di errori invece di ignorarli silenziosamente. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/assumeChangesOnlyAffectDirectDependencies.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Assicura Che I Cambiamenti Influiscano Soltanto Su Dipendenze Dirette" 3 | oneline: "Un'opzione della modalità watch che è drasticamente più veloce, ma a volte imprecisa" 4 | --- 5 | 6 | Quando questa opzione viene abilitata, TypeScript eviterà la verifica/ricostruzione di assolutamente tutti i file, e verificherà/ricostruirà solo i file che sono stati modificati o che potrebbero essere stati interessati dalle modifiche. 7 | 8 | Questo può essere considerato come una implementazione rapida (fast & loose) del algoritmo watching che può drasticamente ridurre i tempi di ricostruzione a scapito di dover eseguire occasionalmente la compilazione completa per ottenere tutti i messaggi di errore del compilatore. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/charset.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Charset" 3 | oneline: "Imposta manualmente la codifica del testo per la lettura dei file" 4 | --- 5 | 6 | Nelle versioni precedenti di TypeScript, questo controllava che tipo di codifica veniva usato quando si leggeva un file di testo dal disco. Oggi, TypeScript assume che la codifica UTF-8, pero correttamente rileverà anche UTF-16 (BE e LE) o UTF-8 [BOMs](https://it.wikipedia.org/wiki/Byte_Order_Mark). 7 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/declarationDir.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Directory dichiarazioni" 3 | oneline: "Definisce la directory principale per i file .d.ts" 4 | --- 5 | 6 | Offre una modo di configurare la directory root in cui salvare i file di dichiarazione. 7 | 8 | ``` 9 | esempio 10 | ├── index.ts 11 | ├── package.json 12 | └── tsconfig.json 13 | ``` 14 | 15 | con questo `tsconfig.json`: 16 | 17 | ```json tsconfig 18 | { 19 | "compilerOptions": { 20 | "declaration": true, 21 | "declarationDir": "./tipi" 22 | } 23 | } 24 | ``` 25 | 26 | Inserirà i file `d.ts` per `index.ts` in una cartella `tipi`: 27 | 28 | ``` 29 | esempio 30 | ├── index.js 31 | ├── index.ts 32 | ├── package.json 33 | ├── tsconfig.json 34 | └── tipi 35 | └── index.d.ts 36 | ``` 37 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/declarationMap.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Mappa delle dichiarazioni" 3 | oneline: "Crea una source map per tutti i file .d.ts" 4 | --- 5 | 6 | Crea una source map per i file `.d.ts` che riportano al file originale `.ts`. 7 | Questo permetterà agli editor come ad esempio VS Code di andare nel file `.ts` originale quando si usano funzioni tipo _Vai alla definizione_. 8 | 9 | Dovresti prendere seriamente in considerazione di abilitare questa funzione se stai usando le project references. 10 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/diagnostics.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Diagnostica" 3 | oneline: "Genera più informazioni diagnostiche dopo la compilazione" 4 | --- 5 | 6 | Viene usato per generare informazioni diagnostiche per debuggare. Questo comando è un sottoinsieme di [`extendedDiagnostics`](#extendedDiagnostics), che sono delle informazioni rivolte all'utente e più facili da interpretare. 7 | 8 | Se ti è stato chiesto da un ingegnere del compilatore TypeScript di dare il risultato della compilazione usando questo flag, non vi è nessun danno nell'usare invece [`--extendedDiagnostics`](#extendedDiagnostics). 9 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/disableReferencedProjectLoad.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Disabilita il caricamento del progetto di riferimento" 3 | oneline: "Riduce il numero di progetti caricati automaticamente da TypeScript" 4 | --- 5 | 6 | In programmi multi progetto di TypeScript, questa caricherà tutti i progetti disponibili in memoria con l'obbiettivo di fornire un risultato più accurato per l'editor che richiede un grafico di conoscenza completo come "Trova tutti i riferimenti". 7 | 8 | Se il tuo progetto è grande, puoi usare il _flag_ `disableReferencedProjectLoad` per disabilitare il caricamento automatico di tutti i progetti. Cosi i progetti vengono caricati dinamicamente quando apri le cartelle attraverso il tuo editor. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/disableSizeLimit.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Disattiva il limite di grandezza" 3 | oneline: "Rimuove la limitazione della memoria sul server di linguaggio TypeScript" 4 | --- 5 | 6 | Per evitare una possibile occupazione inutile della memoria quando si lavora con progetti JavaScript molto grandi, TypeScript ha un limite sulla allocazione della memoria. Attivando questo flag rimuoverà questo limite. 7 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/incremental.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Incrementale" 3 | oneline: "Crea dei file .tsbuildinfo per permettere la compilazione incrementale del progetto" 4 | --- 5 | 6 | Dice a TypeScript di salvare le informazioni riguardo il grafo del progetto dall'ultima compliazione nei file salvati nel disco. 7 | Questo crea una serie di file `.tsbuildinfo` nella stessa cartella del risultato della compilazione. Essi non vengono usati dal tuo JavaScript durante l'esecuzione e possono essere tranquillamente eliminati. Puoi saperne di più riguardo questa flag nelle [3.4 note di rilascio](/docs/handbook/release-notes/typescript-3-4.html#faster-subsequent-builds-with-the---incremental-flag). 8 | 9 | Per scegliere in che cartella vuoi i tuoi file compilati, usa l'opzione di configurazione [`tsBuildInfoFile`](#tsBuildInfoFile). 10 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/noEmit.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Non genera" 3 | oneline: "Non genera file da una compilazione" 4 | --- 5 | 6 | Il compilatore non genera file di output come ad esempio codice JavaScript, source maps o dichiarazioni. 7 | 8 | Questo fa spazio per altri strumenti come [Babel](https://babeljs.io) o [swc](https://github.com/swc-project/swc) per gestire la conversione di un file TypeScript in un file che può essere eseguito in un ambiente JavaScript 9 | 10 | Puoi usare TypeScript come uno strumento che ti offre un integrazione da parte dell'editor e un codice sorgente tipizzato. 11 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/outFile.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "File di output" 3 | oneline: "Crea un solo file js che contiene tutti i file concatenati" 4 | --- 5 | 6 | Se specificato, tutti i file _global_ (non moduli) verranno concatenati in un unico file output specificato. 7 | 8 | Se `module` è `system` o `amd`, tutti i file _module_ saranno concatenati in questo file dopo tutto il contenuto globale. 9 | 10 | Nota: `outFile` non può essere a meno che `module` è `None`, `System`, o `AMD`. 11 | Questa opzione _non può_ essere usata insieme a CommonJS o moduli ES6. 12 | -------------------------------------------------------------------------------- /docs/tsconfig/it/options/tsBuildInfoFile.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "File di informazioni sulla build di TS" 3 | oneline: "Specifica la directory per le informazioni sulla compilazione incrementale .tsbuildinfo." 4 | --- 5 | 6 | Questa configurazione consente di specificare un file per memorizzare le informazioni di compilazione incrementale come parte di progetti compositi che consente la creazione più rapida di basi di codice TypeScript più grandi. Puoi leggere di più sui progetti comopositi [nel manuale](/docs/handbook/project-references.html). 7 | 8 | Questa opzione offre un modo di configurare il posto dove TypeScript tiene traccia dei file che memorizza sul disco per indicare lo stato di compilazione di un progetto — di default, si trovano nella stessa cartella del JavaScript generato. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/it/sections/compilerOptions.md: -------------------------------------------------------------------------------- 1 | ### Opzioni del Compilatore 2 | 3 | Queste opzioni espicitano la configurazione di TypeScript e spiegano come il linguaggio dovrebbe funzionare. -------------------------------------------------------------------------------- /docs/tsconfig/it/sections/watchOptions.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TypeScript-Website-Localizations/3a509241d3dd0c39219a5e3eb64c0e3dab88a5f7/docs/tsconfig/it/sections/watchOptions.md -------------------------------------------------------------------------------- /docs/tsconfig/ja/categories/Additional_Checks_6176.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Linter Checks" 3 | --- 4 | 5 | 追加のチェック集です。これらのチェックは、コンパイラとリンターの境界を多少跨いでいます。より詳細なルールを探しているのであれば、これらのオプションよりもeslintのようなツールの使用を推奨します。 6 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/categories/Advanced_Options_6178.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Advanced" 3 | --- 4 | 5 | デバッグに役立つフラグです。 6 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/categories/Basic_Options_6172.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "プロジェクト設定" 3 | --- 4 | 5 | これらの設定はプロジェクト実行時に期待される挙動を定義します。JavaScriptファイルがどこにどのように出力されるかや、既存JavaScriptコードとの統合レベルが設定されます。 6 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/categories/Command_line_Options_6171.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "コマンドライン" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/categories/Experimental_Options_6177.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "実験的な機能" 3 | --- 4 | 5 | TypeScriptは、JavaScript言語に追加が確認されている機能のみを含めるように努めています。 6 | 7 | 機能がそのルールの例外となるほど説得力がある場合、実験的なコンパイラのフラグとなります。 8 | JavaScript言語にこれらの機能が組み込まれるときに、今のバージョンとは異なる可能性があり、その意味においてリスクと見なされるかもしれません。 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/categories/Module_Resolution_Options_6174.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "モジュール解決" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/categories/Project_Files_0.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "ファイルインクルージョン" 3 | --- 4 | 5 | これらの設定はTypeScriptが適切なファイルを確実に選択できるようにします。 6 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/categories/Source_Map_Options_6175.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "ソースマップ" 3 | --- 4 | 5 | 開発者にとって有用であるリッチなデバッグツールやクラッシュレポートを提供するため、 6 | TypeScriptはJavaScriptのソースマップ標準に準拠したファイルを追加で出力します。 7 | 8 | ソースマップは、そのソースマップが指し示す実体ファイルの隣に`.map`ファイルとして出力されます。 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/categories/Strict_Type_Checking_Options_6173.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "厳密なチェック" 3 | --- 4 | 5 | ビルド時に利用可能なすべての改善を有効化するため、[`strict`](#strict)オプションの利用を推奨します。 6 | 7 | TypeScriptは幅広いJavaScriptパターンと、デフォルトで様々なスタイルの柔軟性を許容しています。 8 | コードベースの安全性と潜在的なスケーラビリティは、これらのテクニックとしばしば相反します。 9 | 10 | サポートされるJavaScriptの多様さにより、TypeScriptを新しいバージョンへアップグレードすると2種類のエラーが明らかになるでしょう: 11 | 12 | - すでにコードベースに存在していたエラー。TypeScriptのJavaScriptに対する理解が洗練されて発見されます。 13 | - 新しい問題領域に取り組む一連の新しいエラー。 14 | 15 | 通常、TypeScriptは後者のエラーに対するコンパイラフラグを追加しますが、デフォルトでは有効化しません。 16 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/categories/Watch_and_Build_Modes_6250.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Watch Options" 3 | --- 4 | 5 | TypeScript 3.8 にてディレクトリを監視するための新戦略をリリースしました。これは、`node_modules` の変更を効率的に検知するために極めて重要なものです。 6 | 7 | Linux のような OS において、TypeScript は 依存関係の変更を検出するために、`node_modules` と多くのサブディレクトリに、(ファイルウォッチャーではなく)ディレクトリウォッチャーをインストールします。 8 | なぜなら、利用できるファイルウォッチャーの数を、`node_modules` のファイル数がしばしば上回る一方で、追跡するディレクトリ数は少なく済むからです。 9 | 10 | 各プロジェクトは異なる戦略の下でより良く動作する可能性もあり、逆にこの新しいアプローチが一連の作業の流れでうまく動作しない可能性もあります。そのため、TypeScript 3.8 では新しく `watchOptions` フィールドが導入されました。このフィールドでは、ファイルやディレクトリを追跡する為に、どの監視戦略を使用すべきか、compiler/language serviceに伝えることができます。 11 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/intro.md: -------------------------------------------------------------------------------- 1 | ## TSConfig リファレンス紹介 2 | 3 | ディレクトリ内の TSConfig ファイルは、TypeScript や JavaScript のプロジェクトルートであることを示します。 4 | TSConfig ファイルは、`tsconfig.json` や `jsconfig.json` のいずれかが利用可能です。どちらを選んでも同じ挙動、同じ設定変数をセットできます。 5 | 6 | このページは TSConfig ファイルで利用できるフラグを余す所なくカバーしています。このページは、フラグ毎の概要から始まり、JSON ファイルのルート属性、オプションの大部分を占める `compilerOptions` を説明し、最後は `watchOptions` で締めくくられます。 7 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/allowSyntheticDefaultImports.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Allow Synthetic Default Imports" 3 | oneline: "Allow 'import x from y' when a module doesn't have a default export" 4 | --- 5 | 6 | `allowSyntheticDefaultImports`をtrueに設定すると、次のようなインポートが可能になります: 7 | 8 | ```ts 9 | import React from "react"; 10 | ``` 11 | 12 | 下記のようにする必要はありません: 13 | 14 | ```ts 15 | import * as React from "react"; 16 | ``` 17 | 18 | モジュールがdefault exportを**指定していなくても**利用可能です。 19 | 20 | このオプションはTypeScriptが出力するJavaScriptへは影響しません。型チェックにのみ影響があります。 21 | このオプションにより、モジュールのdefault exportを自然に扱えるようにする追加コードが出力されている環境では、TypeScriptとBabelの挙動が揃います。 22 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/allowUmdGlobalAccess.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Allow Umd Global Access" 3 | oneline: "Assume UMD imports are all globally available" 4 | --- 5 | 6 | `allowUmdGlobalAccess`をtrueに設定すると、モジュールの内部からUMDへグローバルにアクセスできるようになります。モジュールファイルとは、importやexportを使っているファイルのことです。このフラグを利用しない場合、UMDモジュールを利用するにはimport宣言文が必要です。 7 | 8 | このフラグの利用例は、特定のライブラリ(jQueryやLodashなど)が常に実行時に利用可能であると分かっているが、import文ではそのライブラリにアクセスできないようなwebプロジェクトです。 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/allowUnreachableCode.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Allow Unreachable Code" 3 | oneline: "Error when code will never be called" 4 | --- 5 | 6 | false に設定すると、到達不可能なコードに対する警告を無効化します。 7 | この警告は、JavaScript 構文の利用によって到達不可能になり得るコードにのみ関係します。例えば: 8 | 9 | ```ts 10 | function fn(n: number) { 11 | if (n > 5) { 12 | return true; 13 | } else { 14 | return false; 15 | } 16 | return true; 17 | } 18 | ``` 19 | 20 | `"allowUnreachableCode": false`にすると、次のようになります: 21 | 22 | ```ts twoslash 23 | // @errors: 7027 24 | // @allowUnreachableCode: false 25 | function fn(n: number) { 26 | if (n > 5) { 27 | return true; 28 | } else { 29 | return false; 30 | } 31 | return true; 32 | } 33 | ``` 34 | 35 | このオプションは、型の分析によって到達不可能と判断されたコードについてのエラーには影響しません。 36 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/allowUnusedLabels.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Allow Unused Labels" 3 | oneline: "Error when accidentally creating a label" 4 | --- 5 | 6 | falseにセットすると、利用していないLabelについての警告を無効化します。 7 | 8 | JavaScriptにおいてLabelを利用することは稀ですが、オブジェクトリテラルを記述しようとしたときにLabel構文になってしまうことがあります。 9 | 10 | ```ts twoslash 11 | // @errors: 7028 12 | // @allowUnusedLabels: false 13 | function verifyAge(age: number) { 14 | // 'return'の記述が抜けている 15 | if (age > 18) { 16 | verified: true; 17 | } 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/alwaysStrict.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Always Strict" 3 | oneline: "Ensure 'use strict' is always emitted" 4 | --- 5 | 6 | ファイルをECMAScriptのstrictモードで解釈し、各ファイルへ"use strict"を出力することを保証します。 7 | 8 | [ECMAScript strict](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode)モードはES5で導入され、JavaScriptエンジンが実行時にパフォーマンスを改善できるよう微調整されます。代わりにいくつかのエラーが無視されずにスローされるようになります。 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/assumeChangesOnlyAffectDirectDependencies.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Assume Changes Only Affect Direct Dependencies" 3 | oneline: "A drastically faster, but occasionally inaccurate watch mode option." 4 | --- 5 | 6 | このオプションを設定すると、TypeScriptは本当に影響を受ける可能性があるすべてのファイルの再チェック/再ビルドを避け、変更されたファイルとそれらを直接importしているファイルのみを再チェック/再ビルドするようになります。 7 | 8 | これは監視アルゴリズムの「高速で緩い」実装と見なせます。これにより、すべてのコンパイルエラーメッセージを得るためにフルビルドが必要になりますが、インクリメンタルビルドの再ビルド時間を大幅に短縮できます。 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/baseUrl.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Base Url" 3 | oneline: "Set a baseurl for relative module names" 4 | --- 5 | 6 | 絶対パス参照でないモジュール名を解決するための基点となるディレクトリを設定できます。 7 | 8 | 絶対パスで解決するために、ルートフォルダを決めることもできます。すなわち、 9 | 10 | ``` 11 | baseUrl 12 | ├── ex.ts 13 | ├── hello 14 | │ └── world.ts 15 | └── tsconfig.json 16 | ``` 17 | 18 | `"baseUrl": "./"`とすると、このプロジェクト内では、TypeScriptは`tsconfig.json`と同じフォルダからファイルの探索を行います。 19 | 20 | ```ts 21 | import { helloWorld } from "hello/world"; 22 | 23 | console.log(helloWorld); 24 | ``` 25 | 26 | `"../"`や`"./"`のような毎度のインポート文にうんざりしていたり、 27 | ファイルを移動するときにインポート文を変更する必要がある場合、このオプションは修正するための良い方法です。 28 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/charset.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Charset" 3 | oneline: "Manually set the text encoding for reading files" 4 | --- 5 | 6 | 以前のTypeScriptのバージョンでは、このオプションでディスクからどのエンコードでファイルを読み込むかを制御していました。 7 | 今のTypeScriptはUTF-8でエンコードされていることを前提としています。ただし、UTF-16(BEおよびLE)またはUTF-8のBOMを正しく検出します。 8 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/composite.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Composite" 3 | oneline: "Used to create multiple build projects" 4 | --- 5 | 6 | `composite`オプションは、ビルドツール(`--build`モードでのTypeScript自体を含む) 7 | がプロジェクトがビルドされているかどうかを迅速に判断できるようにするために特定の制約を適用します。 8 | 9 | この設定が有効なとき: 10 | 11 | - 明示的に設定されていない`rootDir`のデフォルト値は`tsconfig.json`ファイルを含むディレクトリとなります。 12 | 13 | - すべての実装ファイルは、`include`パターンにマッチするか`files`リストに含まれなくてはなりません。この制約に違反した場合、`tsc`はどのファイルが指定されていないかを通知します。 14 | 15 | - `declaration`のデフォルト値が`true`になります。 16 | 17 | TypeScriptのプロジェクト機能についてのドキュメントは[ハンドブック](https://www.typescriptlang.org/docs/handbook/project-references.html)から参照できます。 18 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/declarationDir.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Declaration Dir" 3 | oneline: "Set the root directory for d.ts files to go" 4 | --- 5 | 6 | 型定義ファイルが出力されるルートディレクトリを設定します。 7 | 8 | ``` 9 | example 10 | ├── index.ts 11 | ├── package.json 12 | └── tsconfig.json 13 | ``` 14 | 15 | 次の`tsconfig.json`は: 16 | 17 | ```json tsconfig 18 | { 19 | "compilerOptions": { 20 | "declaration": true, 21 | "declarationDir": "./types" 22 | } 23 | } 24 | ``` 25 | 26 | `index.ts`に対応する d.ts ファイルを`types`フォルダへ配置します: 27 | 28 | ``` 29 | example 30 | ├── index.js 31 | ├── index.ts 32 | ├── package.json 33 | ├── tsconfig.json 34 | └── types 35 | └── index.d.ts 36 | ``` 37 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/declarationMap.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Declaration Map" 3 | oneline: "Create sourcemaps for d.ts files" 4 | --- 5 | 6 | 元の`.ts`ソースファイルにマップされる`.d.ts`のソースマップを生成します。 7 | 8 | これにより、VS Codeなどのエディターは、_Go to Definition_のような機能で元の`.ts`ファイルにジャンプできるようになります。 9 | 10 | プエジェクト参照機能を利用している場合、このオプションの有効化を強く推奨します。 11 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/diagnostics.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Diagnostics" 3 | oneline: "Output additional information after a compile" 4 | --- 5 | 6 | デバッグ用にコンパイラからの診断情報を出力するために使用されていました。このコマンドはよりユーザー向けの結果かつ分かりやすい[`extendedDiagnostics`](#extendedDiagnostics)のサブセットです。 7 | 8 | TypeScriptのコンパイラエンジニアからこのフラグを用いて結果を提供するように依頼された場合、代わりに[`--extendedDiagnostics`](#extendedDiagnostics)を用いても問題ありません。 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/disableReferencedProjectLoad.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "disableReferencedProjectLoad" 3 | oneline: "Reduce the number of projects loaded automatically by TypeScript." 4 | --- 5 | 6 | 複数プロジェクトのTypeScriptプログラムでは、TypeScriptは利用可能なすべてのプロジェクトをメモリに読み込みます。これにより、「すべての参照元を検索」のような完全なナレッジグラフを必要とするエディタのレスポンスに対して正確な結果を提供することができます。 7 | 8 | プロジェクトが大規模な場合は、`disableReferencedProjectLoad`フラグを使用してすべてのプロジェクトの自動読み込みを無効にすることができます。代わりに、エディタでファイルを開いたときに動的にプロジェクトが読み込まれます。 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/disableSizeLimit.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Disable Size Limit" 3 | oneline: "Remove the memory cap on the TypeScript language server" 4 | --- 5 | 6 | 非常に大規模なJavaScriptプロジェクトで作業するときに発生する可能性のある使用メモリの膨張を避けるために、TypeScriptが割り当てられるメモリの量には上限があります。このフラグを設定すると、この制限を取り除きます。 7 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/disableSolutionSearching.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Disable Solution Searching" 3 | oneline: " Opt a project out of multi-project reference checking" 4 | --- 5 | 6 | [複合TypeScriptプロジェクト](/docs/handbook/project-references.html)で作業する場合、このオプションはエディタで_find all references_や_定義へ移動_などの機能を使う際に含めたくないプロジェクトを宣言する方法を提供します。 7 | 8 | このフラグは大規模な複合プロジェクトで応答性を高めるために使用できるものです。 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/disableSourceOfProjectReferenceRedirect.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Disable Source Project Reference Redirect" 3 | oneline: "Use d.ts files as the source of truth for tooling between composite project boundries" 4 | --- 5 | 6 | [複合TypeScriptプロジェクト](/docs/handbook/project-references.html)で作業する場合、このオプションはモジュール間の境界としてd.tsファイルが使用されていた[3.7以前](/docs/handbook/release-notes/typescript-3-7.html#build-free-editing-with-project-references)の挙動に戻す方法を提供します。 7 | 3.7にて、信頼できる情報源はTypeScriptのファイルになりました。 8 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/emitBOM.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Emit BOM" 3 | oneline: "Include a byte order mark to output files" 4 | --- 5 | 6 | TypeScriptがファイルを書き込むときに[バイトオーダーマーク(BOM)](https://wikipedia.org/wiki/Byte_order_mark)を出力するかどうかを制御します。 7 | 一部の実行環境ではJavaScriptファイルを正しく解釈するために、BOMが必要となりますが、他の実行環境ではBOMの存在を許容しません。 8 | デフォルト値の`false`は一般的に最適な値ですが、必要であれば変更できます。 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/emitDeclarationOnly.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Emit Declaration Only" 3 | oneline: "Only output d.ts files and not .js files" 4 | --- 5 | 6 | `.d.ts`ファイル_のみ_を出力します; `.js`ファイルは出力しません。 7 | 8 | この設定は2つのケースで有用です: 9 | 10 | - JavaScriptを生成するために、TypeScript以外のトランスパイラを使っているとき 11 | - 利用者向けに`d.ts`ファイルを出力するためだけにTypeScriptを使っているとき 12 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/exclude.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Exclude" 3 | oneline: "Files or patterns to be skipped from the include option" 4 | --- 5 | 6 | `include`の解決時にスキップさせるファイル名やパターンのリストを指定します。 7 | 8 | **重要**: `exclude`は`include`の結果として、どのファイルが含まれるべきか_のみ_に影響を与えます。 9 | `exclude`に指定されたファイルは、コードでの`import`や`types`でのインクルード、`/// (x: T, y: U) => [T, U]; 12 | type B = (x: S, y: S) => [S, S]; 13 | 14 | function f(a: A, b: B) { 15 | b = a; // Ok 16 | a = b; // Error 17 | } 18 | ``` 19 | 20 | このフラグを利用することで、このチェックを無効化できます。 21 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/noUnusedLocals.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "No Unused Locals" 3 | oneline: "Error when a local variable isn't read" 4 | --- 5 | 6 | 利用されていないローカル変数について、エラーを報告します。 7 | 8 | ```ts twoslash 9 | // @noUnusedLocals 10 | // @errors: 6133 11 | const createKeyboard = (modelID: number) => { 12 | const defaultModelID = 23; 13 | return { type: "keyboard", modelID }; 14 | }; 15 | ``` 16 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/noUnusedParameters.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "No Unused Parameters" 3 | oneline: "Error when a parameter isn't used" 4 | --- 5 | 6 | 利用されていない関数のパラメータについて、エラーを報告します。 7 | 8 | ```ts twoslash 9 | // @noUnusedParameters 10 | // @errors: 6133 11 | const createDefaultKeyboard = (modelID: number) => { 12 | const defaultModelID = 23; 13 | return { type: "keyboard", modelID: defaultModelID }; 14 | }; 15 | ``` 16 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/out.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Out" 3 | oneline: "Do not use this" 4 | --- 5 | 6 | 代わりに[outFile](#outfile)を使ってください。 7 | 8 | `out`オプションは、予測可能でない、または一貫性のない方法によってファイルの最終的な場所を計算してしまいます。 9 | このオプションは後方互換性の維持のためにのみ残されていますが、非推奨です。 10 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/outDir.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Out Dir" 3 | oneline: "Set an output folder for all emitted files" 4 | --- 5 | 6 | 設定すると、`.js`ファイル(`.d.ts`や`.js.map`ファイルも同様)がこのディレクトリ内に出力されます。 7 | 元のソースファイルのディレクトリ構造は保存されます。結果のルート構造が意図どおりでない場合は、[rootDir](#rootDir)を参照してください。 8 | 9 | 設定しない場合、`.js`ファイルは`.ts`ファイルを作成したのと同じディレクトリに出力されます。 10 | 11 | ```sh 12 | $ tsc 13 | 14 | example 15 | ├── index.js 16 | └── index.ts 17 | ``` 18 | 19 | 次のような`tsconfig.json`の場合: 20 | 21 | ```json 22 | { 23 | "compilerOptions": { 24 | "outDir": "dist" 25 | } 26 | } 27 | ``` 28 | 29 | この設定で`tsc`を実行すると、ファイルは指定された`dist`フォルダに生成されます。 30 | 31 | ```sh 32 | $ tsc 33 | 34 | example 35 | ├── dist 36 | │ └── index.js 37 | ├── index.ts 38 | └── tsconfig.json 39 | ``` 40 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/outFile.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Out File" 3 | oneline: "Output a single file of all JS files concatenated" 4 | --- 5 | 6 | 設定すると、すべての_グローバルな_(モジュールでない)ファイルは指定した単一の出力ファイルに結合されます。 7 | 8 | もし`module`が`system`か`amd`の場合、この単一出力ファイルのグローバルなコンテンツの後ろにすべてのモジュールファイルも結合されます。 9 | 10 | Note: `module`が`None`、`System`、`AMD`のいずれかでない限り、`outFile`は使用できません。 11 | このオプションはCommonJSまたはES6 Modulesにバンドルする目的では使用_できません_。 12 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/preserveSymlinks.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Preserve Symlinks" 3 | oneline: "Do not resolve symlink paths" 4 | --- 5 | 6 | シンボリックリンクを実体パスへ解決しないというNode.jsの同名フラグを反映したオプションです。 7 | 8 | このフラグはWebpackの`resolve.symlinks`オプションと逆の動作をします(つまり、TypeScriptの`preserveSymlinks`をtrueに設定することは、Webpackの`resolve.symlinks`をfalseに設定することと同等です。逆も然りです)。 9 | 10 | このオプションを有効化すると、モジュールとパッケージへの参照(例えば、`import`や`/// ` ディレクティブ)は、シンボリックリンクが解決する場所としてではなく、そのシンボリックリンクファイルからの相対パスとして解決されます。 11 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/preserveWatchOutput.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Preserve Watch Output" 3 | oneline: "Do not wipe the console in watch mode" 4 | --- 5 | 6 | watchモードについて、変更が発生するたびにスクリーンをクリアせずに以前の出力をコンソールに出し続けるかどうかを設定します。 7 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/pretty.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Pretty" 3 | oneline: "Use color and formatting to make compiler errors easier to read" 4 | --- 5 | 6 | エラーやメッセージを文脈や色を使ってスタイリングします。このオプションはデフォルトで有効です— 7 | コンパイラから簡潔で単色のメッセージを受け取れるようにすることもできます。 8 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/reactNamespace.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "React Namespace" 3 | oneline: "Specify the object which 'createElement' is called on in JSX" 4 | --- 5 | 6 | 代わりに[`--jsxFactory`](#jsxFactory)を利用してください。`react`のときにTSXファイルの`createElement`が実行されるオブジェクトを指定します。 7 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/references.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "References" 3 | oneline: "Provide a structure for composite projects" 4 | --- 5 | 6 | プロジェクト参照はTypeScriptのプログラムを小さい断片に分けて構造化するための手法です。 7 | プロジェクト参照を用いると、ビルド時間やエディターとのインタラクションに必要な時間が大幅に改善され、コンポーネント間の論理分割が強制により、より洗練された方法でコードを整理できます。 8 | 9 | プロジェクト参照がどのように動作するかについては、このハンドブックの[Project References](/docs/handbook/project-references.html)を読んでください。 10 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/skipDefaultLibCheck.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Skip Default Lib Check" 3 | oneline: "use SkipLibCheck instead" 4 | --- 5 | 6 | 代わりに[`--skipLibCheck`](#skipLibCheck)を利用してください。デフォルトのライブラリ型定義ファイルをチェックしないようになります。 7 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/skipLibCheck.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Skip Lib Check" 3 | oneline: "Skip type checking of declaration files" 4 | --- 5 | 6 | 型定義ファイルのチェックをスキップします。 7 | 8 | 型システムの精度を犠牲にすることで、コンパイル実行時間を削減します。 9 | 例えば、2つのライブラリが、同じ`type`を一貫性の無い方法で定義していたとします。 10 | すべての`d.ts`ファイルの完全なチェックを行わずに、TypeScriptはアプリケーション内のソースコードで明示的に参照しているコードの型をチェックします。 11 | 12 | `skipLibCheck`の利用を検討する一般的なケースは、あるライブラリの型定義が`node_modules`内にコピーされて複数存在している場合です。 13 | このようなケースでは、 14 | [yarn's resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/)のような機能の利用を検討してツリーにおける該当の依存関係のコピーが1つだけであることを確認するか、 15 | 追加のツールを使わずに問題を修正するために依存関係の解決を理解して、コピーが1つだけであることを確認する方法を調査する必要があります。 16 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/sourceRoot.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Source Root" 3 | oneline: "Sets the root path for debuggers to find the reference source code" 4 | --- 5 | 6 | 相対的なソースコードの場所の代わりに、デバッガがTypeScriptのファイルを探索すべき場所を明示します。 7 | この文字列は、パスやURLを使用できるソースマップの中で、文字列そのままの値として処理されます: 8 | 9 | ```json 10 | { 11 | "compilerOptions": { 12 | "sourceMap": true, 13 | "sourceRoot": "https://my-website.com/debug/source/" 14 | } 15 | } 16 | ``` 17 | 18 | 上記の設定は、`index.js`は`https://my-website.com/debug/source/index.ts`にソースコードがある、ということを宣言しています。 19 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/strict.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Strict" 3 | oneline: "Enable TypeScript's most in-depth type checking rules" 4 | --- 5 | 6 | `strict`フラグは、プログラムの正しさを強く保証するための幅広い型チェックの挙動を有効化します。 7 | このオプションの有効化は、以降で述べるすべての_strictモードファミリー_オプションの有効化と等価です。 8 | 必要に応じて、個別のstrictモードファミリーを無効化できます。 9 | 10 | 今後のTypeScriptのバージョンがこのフラグの配下により厳密なチェックを導入するかもしれません。この場合、TypeScriptのアップグレードにより、プログラムに新しい種類のエラーが発見されることもあるでしょう。 11 | 適切かつ可能な場合、この挙動を無効化するための対応するフラグも追加されます。 12 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/strictPropertyInitialization.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Strict Property Initialization" 3 | oneline: "Ensure that all class properties match their types after the constructor has finished" 4 | --- 5 | 6 | trueに設定した場合、Classプロパティが宣言されているがコンストラクターで値がセットされていないときに、TypeScriptはエラーを発生させます。 7 | 8 | ```ts twoslash 9 | // @errors: 2564 10 | class UserAccount { 11 | name: string; 12 | accountType = "user"; 13 | 14 | email: string; 15 | address: string | undefined; 16 | 17 | constructor(name: string) { 18 | this.name = name; 19 | // 注 this.emailがセットされていません 20 | } 21 | } 22 | ``` 23 | 24 | 上記の場合: 25 | 26 | - `this.name`は具体的に設定されています。 27 | - `this.accountType`はデフォルト値が設定されています。 28 | - `this.email`は値が設定されていないため、エラーとなります。 29 | - `this.address`は`undefined`になりうる値として宣言されており、これは値の設定が必須でないことを意味しています。 30 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/suppressExcessPropertyErrors.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Suppress Excess Property Errors" 3 | oneline: "Allow additional properties being set during creation of types" 4 | --- 5 | 6 | このオプションにより、次の例に示すような、プロパティが過剰に定義されているときのエラーを抑止します: 7 | 8 | ```ts twoslash 9 | // @errors: 2322 10 | type Point = { x: number; y: number }; 11 | const p: Point = { x: 1, y: 3, m: 10 }; 12 | ``` 13 | 14 | このフラグは、[TypeScript 1.6](/docs/handbook/release-notes/typescript-1-6.html#stricter-object-literal-assignment-checks)のオブジェクトリテラルの厳密チェックへの移行を助けるために追加されました。 15 | 16 | モダンなコードベースでの、このフラグの利用は推奨されません。エラー抑止が必要な箇所で、都度`// @ts-ignore`を利用できます。 17 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/suppressImplicitAnyIndexErrors.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Suppress Implicit Any Index Errors" 3 | oneline: "Remove the warning when using string indexes to access unknown properties" 4 | --- 5 | 6 | `suppressImplicitAnyIndexErrors`を有効化すると、次の例に示すようなオブジェクトへインデックスアクセスしたときの暗黙的anyについてのエラーが抑止されます: 7 | 8 | ```ts twoslash 9 | // @noImplicitAny: true 10 | // @suppressImplicitAnyIndexErrors: false 11 | // @strict: true 12 | // @errors: 7053 13 | const obj = { x: 10 }; 14 | console.log(obj["foo"]); 15 | ``` 16 | 17 | `suppressImplicitAnyIndexErrors`はかなり影響の大きい方法です。代わりに`@ts-ignore`コメントの利用を推奨します: 18 | 19 | ```ts twoslash 20 | // @noImplicitAny: true 21 | // @strict: true 22 | const obj = { x: 10 }; 23 | // @ts-ignore 24 | console.log(obj["foo"]); 25 | ``` 26 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/traceResolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Trace Resolution" 3 | oneline: "Log out paths when resolving all modules" 4 | --- 5 | 6 | あるモジュールがコンパイル対象に含まれていない理由をデバッグするために用います。 7 | `traceResolutions`を`true`にするとTypeScriptが処理された各々のファイルについてモジュール解決過程の情報を出力するようになります。 8 | 9 | この設定についてより詳細に知りたい場合、[ハンドブック](/docs/handbook/module-resolution.html#tracing-module-resolution)をご覧ください。 10 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/tsBuildInfoFile.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "TS Build Info File" 3 | oneline: "Set the folder for .tsbuildinfo files" 4 | --- 5 | 6 | この設定により、インクリメンタルコンパイル情報を複合プロジェクトの一部として保存するためのファイルを指定できるため、より大きなTypeScriptコードベースを迅速に構築できます。 7 | 複合プロジェクトについては[ハンドブック](/docs/handbook/project-references.html)でより詳しく知ることができます。 8 | 9 | このオプションは、TypeScriptがプロジェクトのビルド状態を追跡するためのファイルをディスクのどこに保存するかを設定します。 10 | デフォルトは、JavaScriptファイルの出力先と同じフォルダに保存されます。 11 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/typeRoots.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Type Roots" 3 | oneline: "locations where TypeScript should look for type definitions" 4 | --- 5 | 6 | デフォルトでは、_表示されている_すべての"`@types`"パッケージがコンパイル時にインクルードされます。 7 | プロジェクトを囲んでいる任意のフォルダの`node_modules/@types`内のパッケージが_表示されている_とみなされます。 8 | 例えば、`./node_modules/@types/`、`../node_modules/@types/`、`../../node_modules/@types/`に存在するパッケージが該当します。 9 | 10 | `typeRoots`を設定すると、`typeRoots`配下のパッケージ_のみ_がインクルードされます。例えば: 11 | 12 | ```json 13 | { 14 | "compilerOptions": { 15 | "typeRoots": ["./typings", "./vendor/types"] 16 | } 17 | } 18 | ``` 19 | 20 | この設定ファイルは、`./typings`と`./vendor/types`以下の_すべての_パッケージがインクルードされ、`./node_modules/@types`のパッケージはインクルードされません。 21 | パスはすべて、`tsconfig.json`からの相対パスです。 22 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/useDefineForClassFields.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Use Define For Class Fields" 3 | oneline: "Use define characteristics for handling class fields" 4 | --- 5 | 6 | このフラグは、最新のClassフィールドの仕様へ移行するために用います。TypeScriptのClassフィールド記法は、TC39がClassフィールドの仕様の合意に至るよりも何年も前に導入されました。最新の仕様バージョンは、TypeScriptの実装とは実行時の挙動が異なりますが、構文は同じです。 7 | 8 | このフラグにより、ECMAが定める最新の実行時挙動へ移行できます。 9 | 10 | 移行の詳細については、[3.7 リリースノート](/docs/handbook/release-notes/typescript-3-7.html#the-usedefineforclassfields-flag-and-the-declare-property-modifier)を参照してください。 11 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/watchDirectory.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "watchDirectory" 3 | oneline: "Specify how directories are watched on systems that lack recursive file-watching functionality." 4 | --- 5 | 6 | 再帰的なファイル監視機能を持たないシステムで、ディレクトリツリー全体を監視する方法を指定します。 7 | 8 | - `fixedPollingInterval`: すべてのディレクトリの変更を一定間隔で毎秒数回チェックします。 9 | - `dynamicPriorityPolling`: 変更頻度の低いディレクトリがチェックされる頻度が低くなるような動的なキューを使用します。 10 | - `useFsEvents` (デフォルト): ディレクトリの変更に対するオペレーティングシステム/ファイルシステムのネイティブイベントの使用を試みます。 11 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/options/watchFile.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "watchFile" 3 | oneline: "Specify how the TypeScript watch mode works." 4 | --- 5 | 6 | 個々のファイルを監視する方法を指定します。 7 | 8 | - `fixedPollingInterval`: すべてのファイルの変更を一定間隔で毎秒数回チェックします。 9 | - `priorityPollingInterval`: すべてのファイルの変更を毎秒数回チェックしますが、ヒューリスティックスを使用して他のファイルよりも少ない頻度で特定のタイプのファイルをチェックします。 10 | - `dynamicPriorityPolling`: 変更頻度の低いファイルがチェックされる頻度が低くなるような動的なキューを使用します。 11 | - `useFsEvents` (デフォルト): オペレーティングシステム/ファイルシステムのネイティブイベントの使用をファイルの変更に試みます。 12 | - `useFsEventsOnParentDirectory`: ファイルの親ディレクトリの変更を監視するためにオペレーティングシステム/ファイルシステムのネイティブイベントを使用を試みます。 13 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/sections/compilerOptions.md: -------------------------------------------------------------------------------- 1 | ### コンパイラオプション 2 | 3 | これらのオプションはTypeScriptの設定の大部分を占めており、TypeScriptがどのように動作すべきかを扱います。 4 | -------------------------------------------------------------------------------- /docs/tsconfig/ja/sections/watchOptions.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TypeScript-Website-Localizations/3a509241d3dd0c39219a5e3eb64c0e3dab88a5f7/docs/tsconfig/ja/sections/watchOptions.md -------------------------------------------------------------------------------- /docs/tsconfig/ko/categories/Additional_Checks_6176.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Linter Checks" 3 | --- 4 | 5 | 컴파일러 vs 린터의 경계를 넘는 추가 검사 모음입니다. 좀 더 상세한 규칙을 원한다면 이 옵션보다는 eslint 같은 도구 사용을 추천합니다. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/categories/Advanced_Options_6178.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Advanced" 3 | --- 4 | 5 | 디버깅에 도움을 주는 플래그 6 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/categories/Basic_Options_6172.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Project Options" 3 | --- 4 | 5 | 이 설정은 프로젝트의 런타임 예상 동작, JavaScript 파일을 내보낼 위치나 방법 그리고 기존 JavaScript 코드가 통합되는 수준을 정의하는데 사용됩니다. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/categories/Command_line_Options_6171.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Command Line" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/categories/Experimental_Options_6177.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Experimental" 3 | --- 4 | 5 | TypeScript는 JavaScript 언어에 확실히 추가될 기능만 포함하기 위해 노력합니다. 6 | 7 | 어떤 기능은 이 규칙에서 예외가 될 만큼 강력한 경우가 있으며, 실험적인 컴파일러 플래그로 존재합니다. 8 | 이러한 기능이 포함된 버전은 JavaScript 언어에 추가될 때 의도와 다를 수 있기 때문에 조심스럽게 간주됩니다. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/categories/Module_Resolution_Options_6174.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Module Resolution" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/categories/Project_Files_0.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "File Inclusion" 3 | --- 4 | 5 | 이 설정은 TypeScript가 올바른 파일을 선택할 수 있도록 합니다. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/categories/Source_Map_Options_6175.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Source Maps" 3 | --- 4 | 5 | TypeScript는 JavaScript 소스 맵 표준에 적합한 추가적인 파일을 생성하여, 6 | 개발자가 이해할 수 있는 풍부한 디버깅 툴과 충돌 보고서를 제공합니다. 7 | 8 | 위 기능이 필요한 파일과 함께 해당 `.map` 파일이 생성됩니다. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/categories/Strict_Type_Checking_Options_6173.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Strict Checks" 3 | --- 4 | 5 | [컴파일러 옵션 `strict`](#strict)를 사용해 빌드 시 가능한 모든 개선점을 옵트-인하는 걸 추천합니다. 6 | 7 | TypeScript는 광범위한 JavaScript 패턴과 기본 값을 지원해 이런 스타일을 수용하는 상당한 유연성을 가집니다. 8 | 종종 코드베이스의 안전성과 잠재적 확장성은 이런 기술 중 일부와 상충 될 수 있습니다. 9 | 10 | 다양한 JavaScript 버전을 지원하기 때문에, TypeScript를 새 버전으로 업데이트하면 두 가지 유형의 오류를 발견할 수 있습니다. 11 | 12 | - TypeScript가 JavaScript의 이해도를 개선해 발견한 코드베이스에 이미 존재했던 오류들. 13 | - 새로운 문제 영역을 다루는 새로운 오류 모음. 14 | 15 | 일반적으로 TypeScript는 후자의 오류 집합에 대한 컴파일러 플래그를 추가하며, 기본적으로 비활성화됩니다. 16 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/intro.md: -------------------------------------------------------------------------------- 1 | ## TSConfig Reference 소개 2 | 3 | 디렉터리의 TSConfig 파일은 그 디렉터리가 TypeScript 또는 JavaScript 프로젝트의 루트 디렉터리임을 나타냅니다. 4 | TSConfig 파일은 `tsconfig.json` 또는 `jsconfig.json` 일 수 있으며, 둘 다 같은 동작과 설정 변수의 집합을 가지고 있습니다. 5 | 6 | 이 페이지에서는 TSConfig 파일 내에서 사용할 수 있는 다양한 플래그를 모두 다룹니다. 모든 플래그의 개요를 시작으로 JSON 파일의 루트 속성을 살펴본 다음, 옵션의 대부분을 구성하는 `compilerOptions`를 거쳐 `watchOptions`로 마무리합니다. 7 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/options/alwaysStrict.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Always Strict" 3 | oneline: "Ensure 'use strict' is always emitted" 4 | --- 5 | 6 | 파일을 ECMAScript 엄격 모드로 분석 하고, 각 소스 파일에 "use strict"를 생성합니다. 7 | 8 | ES5에 도입된 [ECMAScript 엄격](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) 모드는 성능 향상을 위해 JavaScript 엔진의 런타임 동작을 변화시켜, 일련의 에러를 무시하지 않고 발생시킵니다. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/options/baseUrl.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Base Url" 3 | oneline: "Set a baseurl for relative module names" 4 | --- 5 | 6 | 절대 경로 참조가 아닌 모듈 이름을 해결하기 위한 기본 디렉터리를 설정할 수 있습니다. 7 | 8 | 절대 경로로 해결하기 위한 루트 폴더를 정의할 수도 있습니다. 예를 들면, 9 | 10 | ``` 11 | baseUrl 12 | ├── ex.ts 13 | ├── hello 14 | │ └── world.ts 15 | └── tsconfig.json 16 | ``` 17 | 18 | 이 프로젝트에서` "baseUrl": "./"`을 사용하면, TypeScript는`tsconfig.json`과 같은 폴더에서 시작하는 파일을 찾습니다. 19 | 20 | ```ts 21 | import { helloWorld } from "hello/world"; 22 | 23 | console.log(helloWorld); 24 | ``` 25 | 26 | 항상 사용하는 `"../"` 또는 `"./"`같은 import에 질렸거나, 파일을 이동해서 변경해야 할 때, 27 | 사용할 수 있는 좋은 방법입니다. 28 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/options/charset.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Charset" 3 | oneline: "Manually set the text encoding for reading files" 4 | --- 5 | 6 | 이전 버전의 TypeScript에서는, 디스크에서 텍스트 파일을 읽을 때 인코딩 방식을 제어했습니다. 7 | 현재 TypeScript는 UTF-8 인코딩을 전제로 합니다. 하지만 UTF-16 (BE 와 LE) 또는 UTF-8 BOMs도 정확하게 감지합니다. 8 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/options/composite.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Composite" 3 | oneline: "Enable constraints that allow a TypeScript project to be used with project references." 4 | --- 5 | 6 | `composite` 옵션은 아직 빌드되지 않은 프로젝트의 빠른 빌드 설정을 위해 빌드 도구(`—build` 모드에서 TypeScript를 포함한)에 특정 조건을 적용합니다. 7 | 8 | 이 설정이 켜져 있으면: 9 | 10 | - 만약 `rootDir` 설정이 설정되어 있지 않다면, 기본값은 'tsconfig.json' 파일을 포함하는 디렉터리입니다. 11 | 12 | - 모든 실행 파일은 `include` 패턴과 일치하거나 `파일` 배열에 나열되어야 합니다. 만약 이 제약 조건을 위반하면, 'tsc'는 지정되지 않은 파일을 알려줍니다. 13 | 14 | - `declaration`의 기본값은 `true` 입니다. 15 | 16 | TypeScript 프로젝트에 대한 문서는 [핸드북](https://www.typescriptlang.org/docs/handbook/project-references.html)에서 확인할 수 있습니다. 17 | -------------------------------------------------------------------------------- /docs/tsconfig/ko/options/exclude.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Exclude" 3 | oneline: "Filters results from the `include` option." 4 | --- 5 | 6 | `include` 에서 파일을 포함할 때 생략할 파일 이름이나 패턴을 배열로 지정합니다. 7 | 8 | **중요** : `exclude` 는 _오직_ `include` 의 설정의 결과로 포함되는 파일만 변경합니다. `exclude` 로 지정된 파일은 코드상의 `types`를 포함하여, `import`에 의해 코드 베이스의 일부가 될 수 있습니다. 이는 `/// `s from expanding the number of files TypeScript should add to a project." 4 | --- 5 | 6 | 기본적으로 TypeScript는 `import` 및 `eslint ao invés dessas opções se você estiver procurando por regras mais profundas. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/categories/Advanced_Options_6178.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Avançado" 3 | --- 4 | 5 | Sinalizadores que ajudam na depuração. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/categories/Basic_Options_6172.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Opções de Projeto" 3 | --- 4 | 5 | Essas configurações são usadas para definir as expectativas de tempo de execução, como e onde você deseja que o JavaScript seja emitido e o nível de integração que você deseja com o código JavaScript existente no seu projeto. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/categories/Command_line_Options_6171.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Linha de comando" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/categories/Experimental_Options_6177.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Experimental" 3 | --- 4 | 5 | TypeScript se esforça para incluir apenas funcionalidades cujas adições estão confirmadas na linguagem Javascript. 6 | 7 | Existem casos que a funcionalidade é atraente o suficiente para ser uma exceção a essa regra, e nesses casos possuem a sinalização do compilador de experimental. 8 | É possível que uma versão dessas funcionalidades seja diferente quando/se forem adicionadas a linguagem Javascript e, portanto, são consideradas de risco. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/categories/Module_Resolution_Options_6174.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Resolução de módulo" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/categories/Project_Files_0.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Inclusão de arquivos" 3 | --- 4 | 5 | Estas configurações garantem que o Typescript pegue os arquivos corretos. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/categories/Source_Map_Options_6175.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Source Maps" 3 | --- 4 | 5 | Para promover ferramentas de depuração ricas e relatórios de erro que façam sentido aos desenvolvedores, o Typescript suporta a emissão de arquivos adicionais que estão em conformidade com os padrões do Javascript Source Map. 6 | 7 | Estes são enviados como arquivos `.map` que ficam ao lado dos arquivos que representam. 8 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/intro.md: -------------------------------------------------------------------------------- 1 | ## Introdução às referências do TSConfig 2 | 3 | Ter um arquivo TSConfig em uma pasta indica que esta pasta é a raiz de um projeto TypeScript ou JavaScript. O arquivo TSConfig pode ser um `tsconfig.json` ou um `jsconfig.json`, os dois possuem o mesmo comportamento e as mesmas variáveis de configuração. 4 | 5 | Esta página cobre todas as diferentes opções de configuração disponíveis em um arquivo TSConfig. Ela começa com uma visão geral de todas as configurações, depois passa pelos atributos principais que estão na raiz do arquivo JSON, então fala sobre as `compilerOptions`, que são a maioria das opções e finaliza com as `watchOptions`. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/allowSyntheticDefaultImports.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Permitir Imports Sintéticos Padrão" 3 | oneline: "Permite 'import x from y' quando um módulo não tem um export padrão" 4 | --- 5 | 6 | Quando está ativo, `allowSyntheticDefaultImports` permite que você escreva um import como: 7 | 8 | ```ts 9 | import React from "react"; 10 | ``` 11 | 12 | Ao invés de: 13 | 14 | ```ts 15 | import * as React from "react"; 16 | ``` 17 | 18 | Quando o módulo **não** especifica um export padrão. 19 | 20 | Isso não afeta o JavaScript que será emitido no TypeScript, somente a checagem de tipos 21 | Essa opção traz o comportamento do TypeScript in-line com o Babel, onde código extra é emitido no final para que o uso de um export padrão seja mais ergonômico. 22 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/allowUmdGlobalAccess.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Permitir Acesso Global UMD" 3 | oneline: "Assume que todos os imports UMD estão disponíveis globalmente" 4 | --- 5 | 6 | Quando setado para `true`, a flag `allowUmdGlobalAccess` deixa que você acesse todos os exports UMD como globais de dentro dos arquivos de módulo. Um arquivo de módulo é um arquivo que tem imports e/ou exports. Sem essa configuração, usando um export de dentro de um módulo UMD vai pedir uma declaração de import. 7 | 8 | Um caso de exemplo para essa flag seria um projeto web onde você sabe que uma biblioteca em particular (como o jQuery ou Lodash) vai estar sempre disponível em runtime, mas você não pode acessá-la com um import. -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/allowUnusedLabels.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Permitir Labels Não Utilizadas" 3 | oneline: "Exibe um erro quando uma label é criada acidentalmente" 4 | --- 5 | 6 | Defina como false para desabilitar os avisos sobre labels não utilizadas. 7 | 8 | Labels são muito raras no JavaScript e, tipicamente, indicam uma tentativa de escrever um objeto literal: 9 | 10 | ```ts twoslash 11 | // @errors: 7028 12 | // @allowUnusedLabels: false 13 | function verificarIdade(idade: number) { 14 | // Esquecemos o 'return' 15 | if (idade > 18) { 16 | verificado: true; 17 | } 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/alwaysStrict.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Sempre Estrito" 3 | oneline: "Garante que 'use strict' é sempre emitido no início do arquivo" 4 | --- 5 | 6 | Garante que seus arquivos sejam analisados no modo estrito do ECMAScript e emitam "use strict" para cada arquivo fonte. 7 | 8 | O modo [estrito do ECMAScript](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) foi introduzido no ES5 e fornece ajustes de comportamento para o runtime do engine JavaScript para melhorar o desempenho e faz um conjunto de erros serem lançados em vez de ignorá-los silenciosamente. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/assumeChangesOnlyAffectDirectDependencies.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Assume que as alterações afetem apenas dependências diretas" 3 | oneline: "Uma opção do modo watch que é drasticamente mais rápida, mas ocasionalmente imprecisa." 4 | --- 5 | 6 | Quando essa opção está ativada, o TypeScript apenas verifica/reconstrói os arquivos que foram alterados, bem como os arquivos que os importam diretamente. Evitando assim a verificação/reconstrução de todos os arquivos que realmente podem ter sido afetados pelas alterações. 7 | 8 | Isso pode ser considerado uma implementação 'rápida' do algoritmo de observação, que pode reduzir drasticamente os tempos de reconstrução incremental às custas de ter que executar a compilação completa ocasionalmente para obter todas as mensagens de erro do compilador. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/charset.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Charset" 3 | oneline: "Seta manualmente o encoding do texto para leitura de arquivos" 4 | --- 5 | 6 | Nas versões anteriores do TypeScript, isso controlava qual codificação era usada ao ler arquivos de texto do disco. 7 | Hoje, o TypeScript assume a codificação UTF-8, mas detectará corretamente as codificações UTF-16 (BE e LE) ou UTF-8 com [BOMs](https://pt.wikipedia.org/wiki/Marca_de_ordem_de_byte). 8 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/declarationDir.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Diretório de declarações" 3 | oneline: "Define o diretório raiz para os arquivos .d.ts" 4 | --- 5 | 6 | Oferece uma maneira de configurar o diretório raiz para onde os arquivos de declaração são emitidos. 7 | 8 | ``` 9 | exemplo 10 | ├── index.ts 11 | ├── package.json 12 | └── tsconfig.json 13 | ``` 14 | 15 | com este `tsconfig.json`: 16 | 17 | ```json tsconfig 18 | { 19 | "compilerOptions": { 20 | "declaration": true, 21 | "declarationDir": "./tipos" 22 | } 23 | } 24 | ``` 25 | 26 | Colocaria o `d.ts` para o `index.ts` em uma pasta`tipos`: 27 | 28 | ``` 29 | exemplo 30 | ├── index.js 31 | ├── index.ts 32 | ├── package.json 33 | ├── tsconfig.json 34 | └── tipos 35 | └── index.d.ts 36 | ``` 37 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/declarationMap.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Mapa de declarações" 3 | oneline: "Cria arquivos sourcemap para os arquivos .d.ts" 4 | --- 5 | 6 | Gera um sourcemap para arquivos `.d.ts`, que são mapeados de volta para o arquivo original `.ts`. 7 | Isso permitirá que editores como o VS Code acessem o arquivo `.ts` original ao usar recursos como _Ir para definição_. 8 | 9 | Você deve fortemente considerar ativar essa opção se estiver usando referências de projeto. 10 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/diagnostics.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Diagnósticos" 3 | oneline: "Gera mais informações de diagnóstico após a compilação" 4 | --- 5 | 6 | Usado para gerar informações de diagnóstico para depuração. Este comando é um subconjunto de [`extendedDiagnostics`](#extendedDiagnostics), apenas com resultados voltados para o usuário e mais fáceis de interpretar. 7 | 8 | Se você tiver sido solicitado por um engenheiro do compilador do TypeScript para fornecer os resultados usando esse sinalizador em uma compilação, não há mal algum em usar [`--extendedDiagnostics`](#extendedDiagnostics) durante o processo. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/disableReferencedProjectLoad.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Desabilitar o carregamento do projeto referenciado" 3 | oneline: "Reduz o número de projetos carregados automaticamente pelo TypeScript" 4 | --- 5 | 6 | Em aplicações Typescript de multi projetos, o TypeScript irá carregar todos os projetos disponíveis na memória com o objetivo de 7 | fornecer resultados mais precisos para as respostas do editor que requerem um gráfico de conhecimento completo como 'Localizar todas as referências'. 8 | 9 | Se o seu projeto for grande, você pode utilizar a _flag_ `disableReferencedProjectLoad` para desabilitar o carregamento automático de todos os projetos. Com isso, os projetos serão carregados dinamicamente quando você abrir os arquivos através do seu editor. 10 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/disableSizeLimit.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Desativar limite de tamanho" 3 | oneline: "Remove a limitação de memória no servidor de linguagem do TypeScript" 4 | --- 5 | 6 | Para evitar um possível problema de inchaço da memória ao trabalhar com projetos JavaScript muito grandes, há um limite superior para a quantidade de memória que o TypeScript alocará. Ativar este sinalizador removerá o limite. 7 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/disableSolutionSearching.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Desabilitar Busca por Soluções" 3 | oneline: "Remove um projeto da checagem de referências multi-projeto" 4 | --- 5 | 6 | Ao trabalhar com [projetos TypeScript compostos](/docs/handbook/project-reference.html), esta opção fornece uma maneira de declarar que você não deseja que um projeto seja incluído ao usar recursos como _encontrar todas as referências_ ou _pular para definição_ em um editor. 7 | 8 | Esse sinalizador é algo que você pode usar para aumentar a capacidade de resposta em grandes projetos compostos. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/disableSourceOfProjectReferenceRedirect.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Desabilitar Redirecionamento de Referências no Projeto de Origem" 3 | oneline: "Usar arquivos .d.ts como a fonte de verdade para todas as ferramentas dentro do escopo de projetos compostos" 4 | --- 5 | 6 | Ao trabalhar com [projetos TypeScript compostos](/docs/handbook/project-reference.html), esta opção fornece uma maneira de voltar [ao comportamento pré-3.7](/docs/handbook/release-notes/typescript-3-7.html#build-free-edition-with-project-reference) em que os arquivos d.ts eram usados como limites entre os módulos. 7 | 8 | Na versão 3.7, a fonte da verdade são agora os arquivos TypeScript. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/emitBOM.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Emitir BOM" 3 | oneline: "Inclui um byte order mark nos arquivos de saída" 4 | --- 5 | 6 | Controla se o TypeScript emitirá uma [BOM (byte order mark)](https://pt.wikipedia.org/wiki/Marca_de_ordem_de_byte) ao gravar arquivos de saída. 7 | Alguns runtimes exigem uma BOM para interpretar corretamente os arquivos JavaScript; outros exigem que ele não esteja presente. 8 | O valor padrão de `false` é geralmente melhor, a menos que você tenha um motivo para alterá-lo. 9 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/emitDeclarationOnly.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Emitir Somente Declarações" 3 | oneline: "Somente emitir arquivos .d.ts e não emitir arquivos .js" 4 | --- 5 | 6 | _Só_ emite arquivos `.d.ts`; não emite arquivos `.js`. 7 | 8 | Essa configuração é útil em dois casos: 9 | 10 | - Você está usando um transpilador diferente do TypeScript para gerar seu JavaScript. 11 | - Você está usando o TypeScript para gerar apenas arquivos `d.ts` para seus consumidores. -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/exclude.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Excluir" 3 | oneline: "Arquivos ou padrões a serem ignorados pela opção de incluir" 4 | --- 5 | 6 | Especifica uma array de nomes de arquivos ou padrões que devem ser ignorando durante o `include`. 7 | 8 | **Importante**: `exclude` altera _apenas_ os arquivos que estão nos resultados da configuração `include`. 9 | Um arquivo marcado como `exclude` ainda pode fazer parte do seu código através de uma instrução `import`, uma inclusão de `types`, uma diretiva `/// (x: T, y: U) => [T, U]; 12 | type B = (x: S, y: S) => [S, S]; 13 | 14 | function f(a: A, b: B) { 15 | b = a; // Ok 16 | a = b; // Erro 17 | } 18 | ``` 19 | 20 | Esta flag pode ser usada para remover essa verificação. 21 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/noUnusedLocals.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Sem Variáveis Locais Não Utilizadas" 3 | oneline: "Emite erro quando uma váriavel local não é lida" 4 | --- 5 | 6 | Reporta erros em variáveis locais não utilizadas. 7 | 8 | ```ts twoslash 9 | // @noUnusedLocals 10 | // @errors: 6133 11 | const criaTeclado = (modeloID: number) => { 12 | const modeloPadraoID = 23; 13 | return { tipo: "teclado", modeloID }; 14 | }; 15 | ``` 16 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/noUnusedParameters.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Sem Parâmetros Não Utilizados" 3 | oneline: "Emite erro quando um parâmetro não é utilizado" 4 | --- 5 | 6 | Reporta erros em parâmetros não utilizados em funções. 7 | 8 | ```ts twoslash 9 | // @noUnusedParameters 10 | // @errors: 6133 11 | const criaTecladoPadrao = (modeloID: number) => { 12 | const modeloPadraoID = 23; 13 | return { tipo: "teclado", modeloID: modeloPadraoID }; 14 | }; 15 | ``` 16 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/out.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Saída" 3 | oneline: "Evite usar esta opção" 4 | --- 5 | 6 | Use [outFile](#outfile) ao invés. 7 | 8 | A opção `out` calcula a localização final do arquivo de uma forma que não é previsível ou consistente. 9 | Esta opção foi mantida apenas para compatibilidade com versões anteriores e foi descontinuada. 10 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/outFile.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Arquivo de saída" 3 | oneline: "Produza um único arquivo de todos os arquivos JS concatenados" 4 | --- 5 | 6 | Se especificado, todos os arquivos _global_ (não módulos) serão concatenados no único arquivo de saída especificado. 7 | 8 | Se `module` for `system` ou `amd`, todos os arquivos do módulo também serão concatenados neste arquivo após todo o conteúdo global. 9 | 10 | Nota: `outFile` não pode ser usado a menos que `module` seja `None`, `System`, ou `AMD`. 11 | Esta opção _não pode_ pode ser usada para agrupar módulos CommonJS ou ES6. 12 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/preserveSymlinks.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Preservar Symlinks" 3 | oneline: "Não resolva caminhos de links simbólicos" 4 | --- 5 | 6 | Esta opção serve para refletir a mesma flag do Node.js; que não resolve o caminho real de links simbólicos. 7 | 8 | Esta flag também exibe o comportamento oposto ao da opção `resolve.symlinks` do Webpack (ou seja, definir `preserveSymlinks` do TypeScript para true é o mesmo que definir `resolve.symlinks` do Webpack para false, e vice-versa). 9 | 10 | Com esta opção habilitada, as referências para módulos e pacotes (ex. diretivas `import` e `/// `) são todas resolvidas em relação ao local do symlink em si, em vez de relativas ao caminho que o symlink resolve. 11 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/preserveWatchOutput.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Manter as saídas observadas" 3 | oneline: "Não limpar o console no modo de observação" 4 | --- 5 | 6 | Mantém as saídas desatualizadas no console durante o modo de observação, ao invés de limpar a tela toda vez que ocorrer alguma modificação. -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/pretty.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Embelezar" 3 | oneline: "Usa cores e formatos para tornar os erros de compilação mais fáceis de ler" 4 | --- 5 | 6 | Estiliza erros e mensagens utilizando cores e contexto, isso é ativado por padrão — oferece a você a oportunidade de receber do compilador menos mensagens concisas e de uma única cor. 7 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/reactNamespace.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Namespace do React" 3 | oneline: "Especificar o objeto em que 'createElement' é chamado no JSX" 4 | 5 | --- 6 | 7 | Use [`--jsxFactory`](#jsxFactory) ao invés disso. Especifica o objeto invocado por `createElement` ao direcionar `react` para arquivos TSX. 8 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/references.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Referências" 3 | oneline: "Prover uma estrutura para projetos compostos" 4 | --- 5 | 6 | As referências de projetos são uma forma de estruturar seus programas TypeScript em partes menores. 7 | Usar referências de projetos pode melhorar muito o tempo de construção e de interação com o editor, forçar uma separação lógica entre os elementos e organizar seu código de novas formas e métodos mais aprimorados. 8 | 9 | Você pode ler mais sobre como as referências funcionam na seção [Referências de Projetos](/docs/handbook/project-references.html). 10 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/skipDefaultLibCheck.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Ignorar a verificação da biblioteca padrão" 3 | oneline: "Utilize o SkipLibCheck ao invés dessa" 4 | --- 5 | 6 | Usar [`--skipLibCheck`](#skipLibCheck) no lugar dessa. Ignora a checagem dos tipos de arquivos de declaração na biblioteca padrão. 7 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/sourceRoot.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Raiz do código-fonte" 3 | oneline: "Configura o caminho da raiz para depuradores acharem o código-fonte referenciado" 4 | 5 | --- 6 | 7 | Especifica a localização onde o depurador deve encontrar os arquivos TypeScript ao invés de outros locais relativos de origem. 8 | Essa string é processada literalmente dentro do mapa de origem, onde você pode utilizar um caminho ou uma URL: 9 | 10 | ```json 11 | { 12 | "compilerOptions": { 13 | "sourceMap": true, 14 | "sourceRoot": "https://my-website.com/debug/source/" 15 | } 16 | } 17 | ``` 18 | 19 | Declara que o `index.js` tem um arquivo fonte em `https://my-website.com/debug/source/index.ts`. 20 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/strict.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Modo estrito" 3 | oneline: "Ativa as regras de verificação de tipo mais detalhadas do TypeScript" 4 | --- 5 | 6 | A opção `strict` permite uma ampla gama de comportamento de verificação de tipo que resulta em melhores garantias de correção do programa. 7 | Ativar isso equivale a ativar todas as opções da _família do modo restrito_, que são descritas abaixo. 8 | Você pode desativar as verificações de família de modo restrito individualmente conforme necessário. 9 | 10 | Versões futuras do TypeScript podem introduzir verificação rigorosas adicionais dentro desta opção, portanto, as atualizações do TypeScript podem resultar em novos erros de tipo em seu programa. 11 | Quando apropriado e possível, uma opção correspondente será adicionado para desativar esse comportamento. 12 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/traceResolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Resolução de rastreamento" 3 | oneline: "Fazer log de caminhos ao resolver todos os módulos" 4 | --- 5 | 6 | Quando você estiver tentando depurar o motivo de um módulo não ter sido incluso, 7 | você pode definir o `traceResolutions` para `true` para que o TypeScript imprima informações sobre o seu processo de resolução de cada arquivo processado. 8 | 9 | Você pode ler mais sobre projetos compostos [nesse guia](/docs/handbook/module-resolution.html#tracing-module-resolution). 10 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/tsBuildInfoFile.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Arquivo de informações da build do TS" 3 | oneline: "Conjunto de pastas para os arquivos .tsbuildinfo" 4 | --- 5 | 6 | Essa configuração possibilita a você especificar um arquivo para armazenar informações incrementais de compilação como parte de projetos compostos que habilitam 7 | builds rápidas de grandes bases de código TypeScript. Você pode ler mais sobre projetos compostos [nesse guia](/docs/handbook/project-references.html). 8 | 9 | Essa opção oferece uma forma de configurar o local onde o TypeScript se mantém informado sobre os arquivos que armazena no disco para 10 | indicar o estado de build de um projeto — por padrão, eles estão na mesma pasta dos seus JavaScripts emitidos. 11 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/options/watchDirectory.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Observar Diretório" 3 | oneline: "Determina como os diretórios são observados" 4 | --- 5 | 6 | Determina a estratégia que rege como árvores de diretório são observadas por mudanças em sistemas que não possuem a funcionalidade de observação recursiva de arquivos. 7 | 8 | - `fixedPollingInterval`: Checa por mudanças nos arquivos várias vezes por segundo a um intervalo pré-determinado. 9 | - `dynamicPriorityPolling`: Usa uma fila dinâmica onde diretórios que são menos alterados serão checados menos vezes. 10 | - `useFsEvents` (padrão): Tenta utilizar os eventos de modificação de diretórios/arquivos do próprio sistema operacional. 11 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/sections/compilerOptions.md: -------------------------------------------------------------------------------- 1 | ### Opções do compilador 2 | 3 | Essas são a maioria das opções do TypeScript e descrevem como o compilador deve funcionar. 4 | -------------------------------------------------------------------------------- /docs/tsconfig/pt/sections/watchOptions.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TypeScript-Website-Localizations/3a509241d3dd0c39219a5e3eb64c0e3dab88a5f7/docs/tsconfig/pt/sections/watchOptions.md -------------------------------------------------------------------------------- /docs/tsconfig/vo/categories/Basic_Options_6172.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Pr0ject Opt1ons" 3 | --- 4 | 5 | These settings ar3 used to define the runtime expectations of ur project, how and where u want the J\$ to be emittd and the lvl of integ8ion you want with existing JS code. 6 | -------------------------------------------------------------------------------- /docs/tsconfig/vo/categories/Project_Files_0.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Fil3s" 3 | --- 4 | 5 | B1ts and d1gits for setting up the filez 6 | -------------------------------------------------------------------------------- /docs/tsconfig/vo/options/noImplicitAny.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "No Implicit @ny" 3 | oneline: "@void introducing nys inside ur codebase when a type could be specified" 4 | --- 5 | 6 | !n s0me cases where n0 type annotations r present, Type\$cript will fall back to a type of `any` for a var when it can't infer the type. 7 | 8 | This c@n cause some errors to be missed, for example: 9 | 10 | ```ts twoslash 11 | // @noImplicitAny: false 12 | function fn(s) { 13 | // No error? 14 | console.log(s.subtr(3)); 15 | } 16 | fn(42); 17 | ``` 18 | 19 | Turning on `noImplicitAny` however T\$ will issue errorz whenever it would have inferred `any`: 20 | 21 | ```ts twoslash 22 | // @errors: 7006 23 | function fn(s) { 24 | console.log(s.subtr(3)); 25 | } 26 | ``` 27 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/categories/Additional_Checks_6176.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "额外检查" 3 | --- 4 | 5 | 额外检查的集合,在某种程度上介于编译器与静态分析工具之间。如果想寻找更深入的规则,您可能更喜欢使用 ESLint 这样的工具。 6 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/categories/Advanced_Options_6178.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "高级" 3 | --- 4 | 5 | 调试相关的选项。 6 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/categories/Basic_Options_6172.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "项目选项" 3 | --- 4 | 5 | 这些设置用于定义项目的运行时期望、JavaScript 的输出方式和位置,以及与现有 JavaScript 代码的集成级别。 -------------------------------------------------------------------------------- /docs/tsconfig/zh/categories/Command_line_Options_6171.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "命令行参数" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/categories/Experimental_Options_6177.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "实验选项" 3 | --- 4 | 5 | TypeScript 力求只包含那些确认会被添加到 JavaScript 语言的特性。 6 | 7 | 不过某些情况下,一个特性被认为可以成为上述原则的例外。这些特性会以实验性的编译器选项存在。这些特性被添加到 JavaScript 语言的版本可能会有所不同,因此使用这些选项是有风险的。 8 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/categories/Module_Resolution_Options_6174.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "模块解析" 3 | --- 4 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/categories/Project_Files_0.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "文件包含" 3 | --- 4 | 5 | 这些设置用于确保 TypeScript 处理正确的文件。 6 | 7 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/categories/Source_Map_Options_6175.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "Source Maps" 3 | --- 4 | 5 | 为了支持丰富的调试工具,并为开发人员提供有意义的崩溃报告,TypeScript 支持生成符合 JavaScript Source Map 标准的附加文件。 6 | 7 | 它们与对应的 JavaScript 文件一起生成,以 `.map` 结尾。 -------------------------------------------------------------------------------- /docs/tsconfig/zh/categories/Strict_Type_Checking_Options_6173.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "严格模式" 3 | --- 4 | 5 | 我们推荐使用[编译器选项`strict`](#strict)来启用每个可能的改进。 6 | 7 | TypeScript支持大量的 JavaScript 模式,默认选项允许相当大的灵活性来适应这些模式。 8 | 然而,很多时候这些技巧的使用与保证代码的安全性和可扩展性的目标相冲突。 9 | 10 | 由于 TS 支持各种类型的 JavaScript,升级到新版本的 TypeScript 时可能出现两种新错误:: 11 | 12 | -代码中已存在的错误:因为语言已经改进了对 JavaScript 的理解,TypeScript 发现了它。 13 | -处理新一块问题的一套新错误。 14 | 15 | TypeScript 通常会为后一类错误添加一个编译器选项,默认情况下这些选项是不启用的。 -------------------------------------------------------------------------------- /docs/tsconfig/zh/categories/Watch_and_Build_Modes_6250.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "监听选项" 3 | --- 4 | 5 | TypeScript 3.8 提供了一个监听目录的新策略,这对于有效地获取 `node_modules` 的更改至关重要。 6 | 7 | 在 Linux 这一类操作系统上,TypeScript 会在 `node_modules` 及其子目录上启动目录监听(而不是文件监听),以检测依赖关系的变化。这是因为 `node_modules` 中的文件数目巨大,经常超过系统允许的最大文件监听数量,而需要监听的目录却少得多。 8 | 9 | 由于不同项目的环境和需求等不同,这个新方法可能不适合你的工作流,因此 TypeScript 3.8 引入了一个新的 `watchOptions` 字段,允许用户告诉编译器或语言服务应该采用哪种策略来跟踪文件和目录更改。 10 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/intro.md: -------------------------------------------------------------------------------- 1 | ## TSConfig 前言 2 | 3 | 目录中的 TSConfig 文件表明该目录是 TypeScript 或 JavaScript 项目的根目录。 4 | TSConfig 文件可以是 `tsconfig.json` 或 `jsconfig.json`,它们的配置项和行为相同。 5 | 6 | 此页涵盖了 TSConfig 文件中可用的所有不同选项。本页从每个选项的概述开始,到 JSON 文件的根属性,然后是`compilerOptions`(大部分选项),最后是 `watchOptions`。 7 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/allowUmdGlobalAccess.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "允许 Umd 全局访问" 3 | oneline: "假设 UMD 的导入是全局可用的" 4 | --- 5 | 6 | 当 `allowUmdGlobalAccess` 设置为 true 时,将允许你在模块文件中以全局变量的形式访问 UMD 的导出。 7 | 模块文件是具有或同时导入、导出的文件。当未设置这个选项时,使用 UMD 模块的导出需要首先导入声明。 8 | 9 | 一个典型场景是:在一个 Web 项目中, 您知道特定的库(如 jQuery 或 Lodash )在运行时总是可用的,但您无法通过导入来使用他们。 10 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/baseUrl.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "基准目录" 3 | oneline: "为相对路径的模块名设置基准目录" 4 | --- 5 | 6 | 可以让您设置解析非绝对路径模块名时的基准目录。 7 | 8 | 你可以定义一个根目录,以进行绝对路径文件解析。例如: 9 | 10 | ``` 11 | baseUrl 12 | ├── ex.ts 13 | ├── hello 14 | │ └── world.ts 15 | └── tsconfig.json 16 | ``` 17 | 18 | 在这个项目中被配置为 `"baseUrl": "./"`,TypeScript 将会从首先寻找与 `tsconfig.json` 处于相同目录的文件。 19 | 20 | ```ts 21 | import { helloWorld } from "hello/world"; 22 | 23 | console.log(helloWorld); 24 | ``` 25 | 26 | 当你厌倦了导入文件时总是 `"../"` 或 `"./"`,或需要在移动文件时更改路径,这是一个很好的解决方法。 27 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/composite.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "组合" 3 | oneline: "启用约束以使工程可以引用其他工程来用于构建。" 4 | --- 5 | 6 | `composite` 选项会强制执行某些约束,使得构建工具(包括 在 `--build` 模式下的 TypeScript 本身)可以快速确定一个工程是否已经建立。 7 | 8 | 当此设置开启时: 9 | 10 | - 如果没有明确指定 `rootDir`,则默认为包含 `tsconfig.json` 文件的目录。 11 | 12 | - 所有实现的文件必须由 `include` 来匹配,或在 `files` 数组中指定。如果违反了这一约束,`tsc` 将告诉你哪些文件没有被指定。 13 | 14 | - `declaration` 默认为 `true`。 15 | 16 | 你可以在[手册](https://www.typescriptlang.org/docs/handbook/project-references.html)中找到关于 TypeScript 工程的文档。 17 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/incremental.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "增量" 3 | oneline: "为支持增量编译工程,保存 .tsbuildinfo 文件" 4 | --- 5 | 6 | 使 TypeScript 将上次编译的工程图信息保存到磁盘上的文件中。这将会在您编译输出的同一文件夹中创建一系列 `.tsbuildinfo` 文件。 7 | 它们不会再运行时被您的 JavaScript 使用,并且可以被安全的删除。 8 | 你可以在 [3.4 发布日志](/docs/handbook/release-notes/typescript-3-4.html#faster-subsequent-builds-with-the---incremental-flag) 中获取更多关于该选项的内容。 9 | 10 | 可以使用 [`tsBuildInfoFile`](#tsBuildInfoFile) 来控制 `.tsbuildinfo` 文件被编译到哪个文件夹。 11 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/moduleResolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "模块解析" 3 | oneline: "允许 TypeScript 1.6 的模块解析策略" 4 | --- 5 | 6 | 指定模块解析策略:`'node'` (Node.js) 或 `'classic'` (在 TypeScript 1.6 版本之前使用)。 7 | 你可能不需要在新代码中使用 `classic`。 8 | 9 | 这里有一个关于[模块解析](/docs/handbook/module-resolution.html)的手册参考。 -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/noEmit.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "禁止生成" 3 | oneline: "不在编译中生产文件。" 4 | --- 5 | 6 | 禁止编译器生成文件,例如 JavaScript 代码,source-map 或声明。 7 | 8 | 这为另一个工具提供了空间,例如用 [Babel](https://babeljs.io) 或 [swc](https://github.com/swc-project/swc) 来处理将 TypeScript 转换为可以在 JavaScript 环境中运行的文件的过程。 9 | 10 | 然后你可以使用 TypeScript 作为提供编辑器集成的工具,或用来对源码进行类型检查。 11 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/outDir.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "输出目录" 3 | oneline: "为所有生成的文件设置一个输出目录。" 4 | --- 5 | 6 | 如果被指定,`.js` (以及 `.d.ts`, `.js.map` 等)将会被生成到这个目录下。 7 | 原始源文件的目录将会被保留,如果计算出的根目录不是你想要的,可以查看 [rootDir](#rootDir)。 8 | 9 | 如果没有指定,`.js` 将被生成至于生成它们的 `.ts` 文件相同的目录中: 10 | 11 | ```sh 12 | $ tsc 13 | 14 | example 15 | ├── index.js 16 | └── index.ts 17 | ``` 18 | 19 | 使用类似这样的 `tsconfig.json`: 20 | 21 | ```json tsconfig 22 | { 23 | "compilerOptions": { 24 | "outDir": "dist" 25 | } 26 | } 27 | ``` 28 | 29 | 使用这些配置运行 `tsc` 时,会将文件移动到指定的 `dist` 文件夹中: 30 | 31 | ```sh 32 | $ tsc 33 | 34 | example 35 | ├── dist 36 | │ └── index.js 37 | ├── index.ts 38 | └── tsconfig.json 39 | ``` 40 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/outFile.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "输出文件" 3 | oneline: "将所有输出打包到一个 .js 文件中。如果 `declaration` 为 true 还可以指定一个 .d.ts 文件。" 4 | --- 5 | 6 | 如果被指定,所有 _全局_ (非模块) 文件将被合并到指定的单个输出文件中。 7 | 8 | 如果 `module` 为 `system` 或 `amd`,所有模块文件也将在所有全局内容之后被合并到这个文件中。 9 | 10 | 注:除非 `module` 是 `None`,`System` 或 `AMD`, 否则不能使用 `outFile`。 11 | 这个选项 _不能_ 用来打包 CommonJS 或 ES6 模块。 12 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/preserveSymlinks.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "保留符号链接" 3 | oneline: "不解析符号链接路径" 4 | --- 5 | 6 | 这是为了匹配 Node.js 中相同的选项,它不解析符号链接的真实路径。 7 | 8 | 这个选项也表现出与 Webpack 中 `resolve.symlinks` 选项相反的行为(即设置 TypeScript 的 `preserveSymlinks` 为 true, 与之对应的 Webpack 的 `resolve.symlinks` 为 false。反之亦然) 9 | 10 | 启用后,对于模块和包的引用(例如 `import` 和 `/// ` 指令都相对于符号链接所在的位置进行解析,而不是相对于符号链接解析后的路径。 11 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/removeComments.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "移除注释" 3 | oneline: "不生成注释。" 4 | --- 5 | 6 | 当转换为 JavaScript 时,忽略所有 TypeScript 文件中的注释。默认为 `false`。 7 | 8 | 例如,这是一个有 JSDoc 注释的 TypeScript 文件: 9 | 10 | ```ts 11 | /** 'Hello world' 的葡萄牙语翻译 */ 12 | export const helloWorldPTBR = "Olá Mundo"; 13 | ``` 14 | 15 | 当然 `removeComments` 被设置为 `true`: 16 | 17 | ```ts twoslash 18 | // @showEmit 19 | // @removeComments: true 20 | /** 'Hello world' 的葡萄牙语翻译 */ 21 | export const helloWorldPTBR = "Olá Mundo"; 22 | ``` 23 | 24 | 未设置 `removeComments` 或被设置为 `false`: 25 | 26 | ```ts twoslash 27 | // @showEmit 28 | // @removeComments: false 29 | /** 'Hello world' 的葡萄牙语翻译 */ 30 | export const helloWorldPTBR = "Olá Mundo"; 31 | ``` 32 | 33 | 这意味着你的注释将呈现在 JavaScript 中。 34 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/rootDirs.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "根目录" 3 | oneline: "设置多个根目录" 4 | --- 5 | 6 | 通过 `rootDirs`,你可以告诉编译器有许多“虚拟”的目录作为一个根目录。这将会允许编译器在这些“虚拟”目录中解析相对应的模块导入,就像它们被合并到同一目录中一样。 7 | 8 | 例如: 9 | 10 | ``` 11 | src 12 | └── views 13 | └── view1.ts (can import "./template1", "./view2`) 14 | └── view2.ts (can import "./template1", "./view1`) 15 | 16 | generated 17 | └── templates 18 | └── views 19 | └── template1.ts (can import "./view1", "./view2") 20 | ``` 21 | 22 | ```json tsconfig 23 | { 24 | "compilerOptions": { 25 | "rootDirs": ["src/views", "generated/templates/views"] 26 | } 27 | } 28 | ``` 29 | 30 | 这不会影响到 TypeScript 如何生成 JavaScript,而仅是模拟了假设它们在运行时能通过这些相对路径工作。 31 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/target.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "编译目标" 3 | oneline: "设置生成的 JavaScript 语言的版本,并且会包含兼容的库(环境)的定义。" 4 | --- 5 | 6 | 现代浏览器支持全部 ES6 的功能,所以 `ES6` 是一个不错的选择。 7 | 如果你的代码部署在旧的环境中,你可以选择设置一个更低的目标;如果你的代码保证会运行在新的环境中,你可以选择一个更高的目标。 8 | 9 | `target` 的配置将会改变哪些 JS 特性会被降级,而哪些会被完整保留 10 | 例如,如果 `target` 是 ES5 或更低版本,箭头函数 `() => this` 会被转换为等价的 `函数` 表达式。 11 | 12 | 改变 `target` 也会改变 [`lib`](#lib) 选项的默认值。 13 | 你可以根据需要混搭 `target` 和 `lib` 的配置,你也可以为了方便只设置 `target`。 14 | 15 | 如果你只使用 Node.js,这里推荐基于 Node 版本的 `target`: 16 | 17 | | 名称 | 支持的编译目标 | 18 | | ------- | ---------------- | 19 | | Node 8 | `ES2017` | 20 | | Node 10 | `ES2018` | 21 | | Node 12 | `ES2019` | 22 | 23 | 这些基于 [node.green](https://node.green) 的支持数据库。 24 | 25 | 特殊的 `ESNext` 值代表你的 TypeScript 所支持的最高版本。这个配置应当被谨慎使用,因为它在不同的 TypeScript 版本之间的含义不同,并且会导致升级更难预测。 26 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/tsBuildInfoFile.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "TS 构建信息文件" 3 | oneline: "为 .tsbuildinfo 增量编译信息指定目录。" 4 | --- 5 | 6 | 这个选项可以让您指定一个文件来存储增量编译信息,以作为复合工程的一部分,从而可以更快的构建更大的 TypeScript 代码库。你可以 [在手册](/docs/handbook/project-references.html) 阅读更多关于复合工程的内容。 7 | 8 | 这个选项提供了一种方法,可以配置 TypeScript 追踪它存储在磁盘上的文件的位置,用来指示项目的构建状态。—— 默认情况下,它们与你生成的 JavaScript 在同一个文件夹中。 9 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/options/typeRoots.md: -------------------------------------------------------------------------------- 1 | --- 2 | display: "类型根路径" 3 | oneline: "TypeScript 应该去哪些路径寻找类型定义" 4 | --- 5 | 6 | 默认情况下,所有 _可见_ 的 "`@types`" 包都将包含在你的编译过程中。 7 | 在 `node_modules/@types` 中的任何包都被认为是 _可见_ 的。 8 | 例如,这意味着包含 `./node_modules/@types/`,`../node_modules/@types/`,`../../node_modules/@types/` 中所有的包。 9 | 10 | 当 `typeRoots` 被指定,_仅有_ 在 `typeRoots` 下的包会被包含。例如: 11 | 12 | ```json tsconfig 13 | { 14 | "compilerOptions": { 15 | "typeRoots": ["./typings", "./vendor/types"] 16 | } 17 | } 18 | ``` 19 | 20 | 这个配置文件将包含 `./typings` 和 `./vendor/types` 下的所有包,而不包括 `./node_modules/@types` 下的。其中所有的路径都是相对于 `tsconfig.json`。 21 | -------------------------------------------------------------------------------- /docs/tsconfig/zh/sections/compilerOptions.md: -------------------------------------------------------------------------------- 1 | ### 编译选项 2 | 3 | 这些选项是 TypeScript 配置的主要部分,它涵盖了语言应该如何工作。 4 | -------------------------------------------------------------------------------- /docs/typescriptlang/es/es.ts: -------------------------------------------------------------------------------- 1 | import { defineMessages } from "react-intl" 2 | import { Copy, messages as englishMessages } from "../en/en" 3 | import { navCopy } from "./nav" 4 | import { headCopy } from "./head-seo" 5 | 6 | import { docCopy } from "./documentation" 7 | import { indexCopy } from "./index" 8 | 9 | import { playCopy } from "./playground" 10 | import { comCopy } from "./community" 11 | import { handbookCopy } from "../en/handbook" 12 | 13 | export const lang: Copy = defineMessages({ 14 | ...englishMessages, 15 | ...navCopy, 16 | ...docCopy, 17 | ...headCopy, 18 | ...indexCopy, 19 | ...playCopy, 20 | ...comCopy, 21 | ...handbookCopy, 22 | }) 23 | -------------------------------------------------------------------------------- /docs/typescriptlang/es/handbook.ts: -------------------------------------------------------------------------------- 1 | export const handbookCopy = { 2 | handb_prev: "Anterior", 3 | handb_next: "Siguiente", 4 | } 5 | -------------------------------------------------------------------------------- /docs/typescriptlang/es/head-seo.ts: -------------------------------------------------------------------------------- 1 | export const headCopy = { 2 | head_playground_title: 3 | "Playground - Un editor en linea para explorar TypeScript y JavaScript", 4 | head_playground_description: 5 | "El editor te permite escribir código TypeScript o JavaScript en linea de manera segura y compartida.", 6 | tsconfig_title: 7 | "Referencia TSConfig - Documentación sobre todas las opciones de configuración en TSConfig", 8 | tsconfig_description: 9 | "Desde la opción allowJs a useDefineForClassFields, las referencias de TSConfig incluyen información sobre todas las configuraciones activas del compilador en un proyecto TypeScript.", 10 | playground_example_prefix: "Playground Example - ", 11 | 12 | head_index_title: "JavaScript Escalable", 13 | head_index_description: "JavaScript Escalable", 14 | } 15 | -------------------------------------------------------------------------------- /docs/typescriptlang/es/nav.ts: -------------------------------------------------------------------------------- 1 | export const navCopy = { 2 | skip_to_content: "Saltar al contenido principal", 3 | nav_documentation: "Documentación", 4 | nav_documentation_short: "Docs", 5 | nav_download: "Descargar", 6 | nav_community: "Conectar", 7 | nav_tools: "Probar TypeScript!", 8 | nav_search_placeholder: "Buscar en documentación", 9 | nav_search_aria: "Búsqueda en el sitio de TypeScript", 10 | } 11 | -------------------------------------------------------------------------------- /docs/typescriptlang/es/tsconfig.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TypeScript-Website-Localizations/3a509241d3dd0c39219a5e3eb64c0e3dab88a5f7/docs/typescriptlang/es/tsconfig.ts -------------------------------------------------------------------------------- /docs/typescriptlang/fr/cheatsheets.ts: -------------------------------------------------------------------------------- 1 | export const cheatCopy = { 2 | cht_layout_title: "Cheat sheets", 3 | cht_layout_description: 4 | "Cheat sheets reprenant la syntaxe de TypeScript.", 5 | cht_download: "Télécharger le zip", 6 | cht_blurb_1: "Pages de documentation de la syntaxe téléchargeables pour les différentes parties du code TypeScript utilisé couramment.", 7 | cht_blurb_2: "Apprenez-en plus sur les classes, les interfaces, les types et l'analyse du flux de contrôle.", 8 | 9 | cht_cfa: "Analyse du flux de contrôle", 10 | cht_interfaces: "Interfaces", 11 | cht_types: "Types", 12 | cht_classes: "Classes", 13 | cht_dl_title: "Télécharger les PDF et PNG", 14 | cht_dl_subtitle: "A lire plus tard ou à imprimer", 15 | } 16 | -------------------------------------------------------------------------------- /docs/typescriptlang/fr/dt.ts: -------------------------------------------------------------------------------- 1 | export const dtCopy = { 2 | dt_s_page_title: "Rechercher des paquets typés", 3 | dt_s_title: "Rechercher des types", 4 | dt_s_subtitle: 5 | "Trouvez des paquets npm qui ont des déclarations de types, soit intégrés ou sur Definitely Typed.", 6 | dt_s_match: "résultat", 7 | dt_s_matchs: "résultats", 8 | dt_s_match_exact: "Résultat exact", 9 | dt_s_popular_on_dt: "Populaire sur Definitely Typed", 10 | dt_s_downloads_short: "DLs", 11 | dt_s_downloads_via: "Via", 12 | dt_s_module: "Module", 13 | dt_s_last_update: "Dernière mise à jour", 14 | dt_s_install: "Installer", 15 | dt_s_no_results: "Aucun résultat trouvé pour", 16 | dt_s_no_results_try: "Essayez une autre recherche ?", 17 | dt_s_copy: "copier", 18 | dt_s_copied: "copié", 19 | }; 20 | -------------------------------------------------------------------------------- /docs/typescriptlang/fr/footer.ts: -------------------------------------------------------------------------------- 1 | export const footerCopy = { 2 | footer_customize: "Personnaliser", 3 | footer_site_colours: "Couleurs du site", 4 | footer_code_font: "Police du code", 5 | footer_site_colours_options_system: "Système", 6 | footer_site_colours_options_always_light: "Toujours clair", 7 | footer_site_colours_options_always_dark: "Toujours sombre", 8 | } 9 | -------------------------------------------------------------------------------- /docs/typescriptlang/fr/handbook.ts: -------------------------------------------------------------------------------- 1 | export const handbookCopy = { 2 | handb_prev: "Précédent", 3 | handb_next: "Suivant", 4 | handb_on_this_page: "Sur cette page", 5 | handb_like_dislike_title: "Cette page est-elle utile ?", 6 | handb_like_desc: "Oui", 7 | handb_dislike_desc: "Non", 8 | handb_thanks: "Merci pour votre retour", 9 | handb_deprecated_title: "Cette page a été dépréciée", 10 | handb_deprecated_subtitle: "Cette page du guide a été remplacée, ", 11 | handb_deprecated_subtitle_link: "aller à la nouvelle page", 12 | handb_deprecated_subtitle_action: "Aller à la nouvelle page", 13 | handb_experimental_title: "Cette page contient la documentation expérimentale", 14 | handb_experimental_subtitle: "Le contenu concerne un sujet qui n'est pas encore définitif.", 15 | 16 | }; 17 | -------------------------------------------------------------------------------- /docs/typescriptlang/fr/head-seo.ts: -------------------------------------------------------------------------------- 1 | export const headCopy = { 2 | head_playground_title: 3 | "Playground TS - Un éditeur en ligne pour explorer TypeScript et JavaScript", 4 | head_playground_description: 5 | "Le playground vous permet d'écrire du TypeScript ou du JavaScript en ligne de manière sûre et partageable.", 6 | tsconfig_title: "Référence TSConfig - documentation sur toutes les options du fichier TSConfig", 7 | tsconfig_description: 8 | "De allowJs à useDefineForClassFields, la référence TSConfig documente les différents options du compilateur qui permettent de configurer un projet TypeScript.", 9 | playground_example_prefix: "Playground Exemple - ", 10 | 11 | head_index_title: "JavaScript typé à toute échelle", 12 | head_index_description: "JavaScript typé à toute échelle", 13 | }; 14 | -------------------------------------------------------------------------------- /docs/typescriptlang/fr/index.ts: -------------------------------------------------------------------------------- 1 | export const indexCopy = { 2 | // The index page copy lives at index2.ts 3 | index_releases: "Versions trimestrielles", 4 | index_releases_pt1: "Notre prochaine version est ", 5 | index_releases_pt2: ", qui est prévue pour ", 6 | index_releases_released: "Publiée", 7 | index_releases_beta: "Bêta", 8 | index_releases_rc: "RC" 9 | } 10 | -------------------------------------------------------------------------------- /docs/typescriptlang/fr/tsconfig.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TypeScript-Website-Localizations/3a509241d3dd0c39219a5e3eb64c0e3dab88a5f7/docs/typescriptlang/fr/tsconfig.ts -------------------------------------------------------------------------------- /docs/typescriptlang/id/dt.ts: -------------------------------------------------------------------------------- 1 | export const dtCopy = { 2 | dt_s_page_title: "Cari paket yang mempunyai tipe data", 3 | dt_s_title: "Cari Tipe Data", 4 | dt_s_subtitle: 5 | "Cari paket npm yang mempunyai deklarasi tipe data, yang jadi satu maupun di Definitely Typed.", 6 | dt_s_match: "cocok", 7 | dt_s_matchs: "cocok", 8 | dt_s_match_exact: "Benar-benar Cocok", 9 | dt_s_popular_on_dt: "Populer di Definitely Typed", 10 | dt_s_downloads_short: "DLs", 11 | dt_s_downloads_via: "Melalui", 12 | dt_s_module: "Modul", 13 | dt_s_last_update: "Terakhir Diperbarui", 14 | dt_s_install: "Pasang", 15 | dt_s_no_results: "Tidak ada hasil ditemukan untuk", 16 | dt_s_no_results_try: "Coba pencarian lain?", 17 | dt_s_copy: "salin", 18 | dt_s_copied: "tersalin", 19 | } 20 | -------------------------------------------------------------------------------- /docs/typescriptlang/id/handbook.ts: -------------------------------------------------------------------------------- 1 | export const handbookCopy = { 2 | handb_prev: "Sebelumnya", 3 | handb_next: "Selanjutnya", 4 | } 5 | -------------------------------------------------------------------------------- /docs/typescriptlang/id/head-seo.ts: -------------------------------------------------------------------------------- 1 | export const headCopy = { 2 | head_playground_title: 3 | "Area Bermain - Sebuah editor daring untuk menjelajahi TypeScript dan JavaScript", 4 | head_playground_description: 5 | "Area Bermain membuat Anda bisa menulis TypeScript atau JavaScript secara daring dengan aman dan bisa dibagikan.", 6 | tsconfig_title: "Referensi TSConfig - Dokumentasi bagi setiap opsi TSConfig", 7 | tsconfig_description: 8 | "Dari allowJs hingga useDefineForClassFields referensi TSConfig meliputi informasi tentang semua tanda kompiler yang aktif untuk mengatur projek TypeScript.", 9 | playground_example_prefix: "Contoh Area Bermain - ", 10 | head_index_title: "JavaScript dengan Tipe dalam skala apapun", 11 | head_index_description: "JavaScript dengan Tipe dalam skala apapun", 12 | } 13 | -------------------------------------------------------------------------------- /docs/typescriptlang/id/id.ts: -------------------------------------------------------------------------------- 1 | import { defineMessages } from "react-intl" 2 | import { comCopy } from "./community" 3 | import { docCopy } from "./documentation" 4 | import { handbookCopy } from "./handbook" 5 | import { headCopy } from "./head-seo" 6 | import { indexCopy } from "./index" 7 | import { navCopy } from "./nav" 8 | import { playCopy } from "./playground" 9 | import { Copy, messages as englishMessages } from "../en/en" 10 | 11 | export const lang: Copy = defineMessages({ 12 | ...englishMessages, 13 | ...comCopy, 14 | ...docCopy, 15 | ...handbookCopy, 16 | ...headCopy, 17 | ...indexCopy, 18 | ...navCopy, 19 | ...playCopy, 20 | }) 21 | -------------------------------------------------------------------------------- /docs/typescriptlang/id/tsconfig.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TypeScript-Website-Localizations/3a509241d3dd0c39219a5e3eb64c0e3dab88a5f7/docs/typescriptlang/id/tsconfig.ts -------------------------------------------------------------------------------- /docs/typescriptlang/ja/handbook.ts: -------------------------------------------------------------------------------- 1 | export const handbookCopy = { 2 | handb_prev: "戻る", 3 | handb_next: "次へ", 4 | handb_on_this_page: "このページ", 5 | handb_like_dislike_title: "このページは役に立ちましたか?", 6 | handb_like_desc: "はい", 7 | handb_dislike_desc: "いいえ", 8 | handb_thanks: "ありがとうございます。", 9 | } 10 | -------------------------------------------------------------------------------- /docs/typescriptlang/ja/head-seo.ts: -------------------------------------------------------------------------------- 1 | export const headCopy = { 2 | head_playground_title: 3 | "プレイグラウンド - TypeScriptとJavascriptを探求するためのオンラインエディタ", 4 | head_playground_description: 5 | "プレイグラウンドで、TypeScriptとJavascriptのコードをオンラインで安全に共有できる形で書くことができます", 6 | tsconfig_title: 7 | "TSConfig リファレンス - すべてのTSConfigのオプションのドキュメント", 8 | tsconfig_description: 9 | "allowJs から useDefineForClassFields まで、TSConfigのドキュメントは、TypeScriptプロジェクトで設定可能なコンパイラオプションのすべてを含んでいます", 10 | playground_example_prefix: "プレイグラウンド 例 - ", 11 | 12 | head_index_title: "どんな規模でも型付けされたJavaScriptを", 13 | head_index_description: "どんな規模でも型付けされたJavaScriptを", 14 | } 15 | -------------------------------------------------------------------------------- /docs/typescriptlang/ja/ja.ts: -------------------------------------------------------------------------------- 1 | import { defineMessages } from "react-intl" 2 | import { navCopy } from "./nav" 3 | import { docCopy } from "./documentation" 4 | import { headCopy } from "./head-seo" 5 | import { playCopy } from "./playground" 6 | import { comCopy } from "./community" 7 | import { handbookCopy } from "./handbook" 8 | import { Copy, messages as englishMessages } from "../en/en" 9 | 10 | export const lang: Copy = defineMessages({ 11 | ...englishMessages, 12 | ...navCopy, 13 | ...docCopy, 14 | ...headCopy, 15 | ...playCopy, 16 | ...comCopy, 17 | ...handbookCopy, 18 | }) 19 | -------------------------------------------------------------------------------- /docs/typescriptlang/ja/tsconfig.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TypeScript-Website-Localizations/3a509241d3dd0c39219a5e3eb64c0e3dab88a5f7/docs/typescriptlang/ja/tsconfig.ts -------------------------------------------------------------------------------- /docs/typescriptlang/ko/ko.ts: -------------------------------------------------------------------------------- 1 | import { defineMessages } from "react-intl" 2 | import { navCopy } from "./nav" 3 | import { comCopy } from "./community" 4 | // import { headCopy } from "./head-seo" 5 | // import { docCopy } from "./documentation" 6 | // import { indexCopy } from "./index" 7 | // import { playCopy } from "./playground" 8 | // import { handbookCopy } from "./handbook" 9 | // import { dtCopy } from "./dt" 10 | import { Copy, messages as englishMessages } from "../en/en" 11 | 12 | export const lang: Copy = defineMessages({ 13 | ...englishMessages, 14 | ...navCopy, 15 | ...comCopy, 16 | // ...headCopy, 17 | // ...docCopy, 18 | // ...indexCopy, 19 | // ...playCopy, 20 | // ...handbookCopy, 21 | // ...dtCopy, 22 | }) 23 | -------------------------------------------------------------------------------- /docs/typescriptlang/pl/dt.ts: -------------------------------------------------------------------------------- 1 | export const dtCopy = { 2 | dt_s_page_title: "Szukaj typowanych pakietów", 3 | dt_s_title: "Szukaj typowanych", 4 | dt_s_subtitle: 5 | "Znajdź pakiety npm, które mają deklaracje typu w pakiecie lub są Definitely Typed.", 6 | dt_s_match: "pasuje", 7 | dt_s_matchs: "pasujący", 8 | dt_s_match_exact: "Dokładne dopasowanie", 9 | dt_s_popular_on_dt: "Popularne Definitely Typed", 10 | dt_s_downloads_short: "PB", 11 | dt_s_downloads_via: "Przez", 12 | dt_s_module: "Moduł", 13 | dt_s_last_update: "Data ostatniej aktualizacji", 14 | dt_s_install: "Instalacja", 15 | dt_s_no_results: "Nie znaleziono wyników dla", 16 | dt_s_no_results_try: "Spróbuj innego wyszukiwania?", 17 | dt_s_copy: "kopiuj", 18 | dt_s_copied: "skopiowane", 19 | } 20 | -------------------------------------------------------------------------------- /docs/typescriptlang/pl/handbook.ts: -------------------------------------------------------------------------------- 1 | export const handbookCopy = { 2 | handb_prev: "Poprzednia", 3 | handb_next: "Następna", 4 | handb_on_this_page: "Na tej stronie", 5 | handb_like_dislike_title: "Czy ta strona jest przydatna?", 6 | handb_like_desc: "Tak", 7 | handb_dislike_desc: "Nie", 8 | handb_thanks: "Dziękujemy za feedback", 9 | } 10 | -------------------------------------------------------------------------------- /docs/typescriptlang/pl/head-seo.ts: -------------------------------------------------------------------------------- 1 | export const headCopy = { 2 | head_playground_title: 3 | "TS Playground - Edytor online dla eksploracji TypeScript oraz JavaScript", 4 | head_playground_description: 5 | "Playground pozwala na pisanie TypeScript lub JavaScript online w bezpieczny i udostępnialny sposób.", 6 | tsconfig_title: 7 | "Dokumentacja TSConfig - Dokumenty dla każdej opcji TSConfig.", 8 | tsconfig_description: 9 | "Od allowJs do useDefineForClassFields dokumentacja TSConfig zawiera informacje o wszystkich aktywnych flagach kompilatora konfigurujących projekt TypeScript.", 10 | playground_example_prefix: "Przykład Playground - ", 11 | 12 | head_index_title: "Typowany JavaScript w dowolnej skali", 13 | head_index_description: "Typowany JavaScript w dowolnej skali", 14 | } 15 | -------------------------------------------------------------------------------- /docs/typescriptlang/pl/pl.ts: -------------------------------------------------------------------------------- 1 | import { defineMessages } from "react-intl" 2 | import { Copy, messages as englishMessages } from "../en/en" 3 | import { navCopy } from "./nav" 4 | import { indexCopy } from "./index" 5 | import { handbookCopy } from "./handbook" 6 | import { dtCopy } from "./dt" 7 | import { headCopy } from "./head-seo" 8 | import { playCopy } from "./playground" 9 | 10 | export const lang: Copy = defineMessages({ 11 | ...englishMessages, 12 | ...navCopy, 13 | ...indexCopy, 14 | ...handbookCopy, 15 | ...dtCopy, 16 | ...headCopy, 17 | ...playCopy, 18 | }) 19 | -------------------------------------------------------------------------------- /docs/typescriptlang/pt/dt.ts: -------------------------------------------------------------------------------- 1 | export const dtCopy = { 2 | dt_s_page_title: "Procure por pacotes tipados", 3 | dt_s_title: "Pesquisa de tipo", 4 | dt_s_subtitle: 5 | "Encontre pacotes npm que tenham declarações de tipo, tanto agrupados quanto no Definitely Typed.", 6 | dt_s_match: "resultado", 7 | dt_s_matchs: "resultados", 8 | dt_s_match_exact: "Combinação exata", 9 | dt_s_popular_on_dt: "Popular no Definitely Typed", 10 | dt_s_downloads_short: "Downl.", 11 | dt_s_downloads_via: "Via", 12 | dt_s_module: "Módulo", 13 | dt_s_last_update: "Última atualização", 14 | dt_s_install: "Instalar", 15 | dt_s_no_results: "Nenhum resultado encontrado para", 16 | dt_s_no_results_try: "Tentar outra busca?", 17 | dt_s_copy: "copiar", 18 | dt_s_copied: "copiado", 19 | } 20 | -------------------------------------------------------------------------------- /docs/typescriptlang/pt/handbook.ts: -------------------------------------------------------------------------------- 1 | export const handbookCopy = { 2 | handb_prev: "Anterior", 3 | handb_next: "Próximo", 4 | } 5 | -------------------------------------------------------------------------------- /docs/typescriptlang/pt/head-seo.ts: -------------------------------------------------------------------------------- 1 | export const headCopy = { 2 | head_playground_title: 3 | "Playground - Um editor online para explorar TypeScript e JavaScript", 4 | head_playground_description: 5 | "O Playground permite que você escreva TypeScript ou JavaScript online de maneira segura e compartilhável.", 6 | tsconfig_title: 7 | "Referência de TSConfig - Documentos em todas as opções do TSConfig", 8 | tsconfig_description: 9 | "De 'allowJs' até 'useDefineForClassFields', a referência de TSConfig inclui informações sobre todas as 'flags' de compilador ativas configurando um projeto TypeScript", 10 | playground_example_prefix: "Exemplo de Playground - ", 11 | 12 | head_index_title: "JavaScript Tipado em Qualquer Escala", 13 | head_index_description: "JavaScript Tipado em Qualquer Escala", 14 | } 15 | -------------------------------------------------------------------------------- /docs/typescriptlang/pt/pt.ts: -------------------------------------------------------------------------------- 1 | import { defineMessages } from "react-intl" 2 | import { Copy, messages as englishMessages } from "../en/en" 3 | import { navCopy } from "./nav" 4 | import { docCopy } from "./documentation" 5 | import { indexCopy } from "./index" 6 | import { comCopy } from "./community" 7 | import { handbookCopy } from "./handbook" 8 | 9 | export const lang: Copy = defineMessages({ 10 | ...englishMessages, 11 | ...navCopy, 12 | ...docCopy, 13 | ...indexCopy, 14 | ...comCopy, 15 | ...handbookCopy, 16 | }) 17 | -------------------------------------------------------------------------------- /docs/typescriptlang/vo/nav.ts: -------------------------------------------------------------------------------- 1 | export const navCopy = { 2 | skip_to_content: "Sk1p t0 main Con7ent", 3 | nav_documentation: "D0cumentation", 4 | nav_documentation_short: "Docs", 5 | nav_download: "DL", 6 | nav_community: "Konnect", 7 | nav_tools: "Playground", 8 | nav_search_placeholder: "Se4rch D0cz", 9 | } 10 | -------------------------------------------------------------------------------- /docs/typescriptlang/vo/vo.ts: -------------------------------------------------------------------------------- 1 | import { defineMessages } from "react-intl" 2 | import { navCopy } from "./nav" 3 | import { Copy, messages as englishMessages } from "../en/en" 4 | import { comCopy } from "../en/community" 5 | 6 | export const lang: Copy = defineMessages({ 7 | ...navCopy, 8 | ...englishMessages, 9 | ...comCopy, 10 | }) 11 | -------------------------------------------------------------------------------- /docs/typescriptlang/zh/handbook.ts: -------------------------------------------------------------------------------- 1 | export const handbookCopy = { 2 | handb_prev: "上一篇", 3 | handb_next: "下一篇", 4 | } 5 | -------------------------------------------------------------------------------- /docs/typescriptlang/zh/head-seo.ts: -------------------------------------------------------------------------------- 1 | export const headCopy = { 2 | head_playground_title: 3 | "演练场 - 一个用于 TypeScript 和 JavaScript 的在线编辑器", 4 | head_playground_description: 5 | "可以通过演练场以安全且可共享的方式在线编写 TypeScript 和 JavaScript。", 6 | tsconfig_title: "TSConfig 参考 - 所有 TSConfig 选项的文档", 7 | tsconfig_description: 8 | "不管是 allowJs 还是 useDefineForClassFields, TSConfig 的参考包含所有关于配置项目的有效的 TypeScript 编译器选项。", 9 | playground_example_prefix: "演练场示例 - ", 10 | 11 | head_index_title: "拥有类型的 JavaScript,且适用于任何规模的工程", 12 | head_index_description: "拥有类型的 JavaScript,且适用于任何规模的工程", 13 | } 14 | -------------------------------------------------------------------------------- /docs/typescriptlang/zh/nav.ts: -------------------------------------------------------------------------------- 1 | export const navCopy = { 2 | skip_to_content: "跳转到内容", 3 | nav_documentation: "文档", 4 | nav_documentation_short: "文档", 5 | nav_download: "下载", 6 | nav_community: "社区", 7 | nav_tools: "工具", 8 | nav_search_placeholder: "搜索文档", 9 | nav_search_aria: "搜索 TypeScript 网站", 10 | // let me know if you can't make this work in your lang: 11 | // TypeScript X.Y [stable][between?]Z.Y[beta/rc] 12 | nav_playground: "演练场", 13 | nav_playground_short: "尝试", 14 | nav_handbook: "手册", 15 | nav_this_page_in_your_lang: "当前页面有适用于您语言的翻译版本", 16 | nav_this_page_in_your_lang_open: "打开", 17 | nav_this_page_in_your_lang_no_more: "不再询问", 18 | nav_version_stable_prefix: "已经发布", 19 | nav_version_between: ", ", 20 | nav_version_beta_prefix: "目前在 beta 测试中。", 21 | nav_version_rc_prefix: "可以尝试预发布版本。", 22 | } 23 | -------------------------------------------------------------------------------- /docs/typescriptlang/zh/tsconfig.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TypeScript-Website-Localizations/3a509241d3dd0c39219a5e3eb64c0e3dab88a5f7/docs/typescriptlang/zh/tsconfig.ts -------------------------------------------------------------------------------- /docs/typescriptlang/zh/zh.ts: -------------------------------------------------------------------------------- 1 | import { defineMessages } from "react-intl" 2 | import { playCopy } from "./playground" 3 | import { messages as englishMessages } from "../en/en" 4 | import { navCopy } from "./nav" 5 | import { headCopy } from "./head-seo" 6 | import { docCopy } from "./documentation" 7 | import { indexCopy } from "./index" 8 | import { comCopy } from "./community" 9 | import { handbookCopy } from "./handbook" 10 | 11 | export const lang = defineMessages({ 12 | ...englishMessages, 13 | ...navCopy, 14 | ...docCopy, 15 | ...headCopy, 16 | ...indexCopy, 17 | ...playCopy, 18 | ...comCopy, 19 | ...handbookCopy, 20 | }) 21 | --------------------------------------------------------------------------------