-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs(i18n-id): translate generateCpuProfile.md until isolatedModules.md into indonesian #1173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ff84194
docs(i18n-id): translate generateCpuProfile.md until include.md into …
zaiinhs 25dcddc
docs(i18n-id): translate incremental.md until isolatedModules.md into…
zaiinhs 483276e
docs(i18n-id) update file isolatedModules.md
zaiinhs 9ea6cce
docs(i18n-id) update file isolatedModules.md
zaiinhs 68746af
docs(i18n-id) update file generateCpuProfile.md until include.md into…
zaiinhs 2d1748e
docs(i18n-id) update file into indonesian
zaiinhs 3d11840
docs(i18n-id) update file into indonesian
zaiinhs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
packages/tsconfig-reference/copy/id/options/generateCpuProfile.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
display: "Hasilkan Profil CPU" | ||
oneline: "Keluarkan profil CPU v8 dari penyusun yang dijalankan untuk di analisa" | ||
--- | ||
|
||
Opsi ini memberi Anda kesempatan untuk meminta TypeScript mengeluarkan profil CPU v8 selama penyusun dijalankan. Profil CPU dapat memberikan wawasan tentang mengapa proyek Anda bisa lambat. | ||
|
||
Opsi ini hanya dapat digunakan dari CLI melalui: `--generateCpuProfile tsc-output.cpuprofile`. | ||
|
||
```sh | ||
npm run tsc --generateCpuProfile tsc-output.cpuprofile | ||
``` | ||
|
||
Berkas ini dapat dibuka di peramban berbasis chromium seperti Chrome atau Edge Developer di bagian [Riwayat CPU](https://developers.google.com/web/tools/chrome-devtools/rendering-tools/js-execution). | ||
Anda dapat mempelajari lebih lanjut tentang memahami kinerja penyusun di [Bagian wiki TypeScript tentang kinerja](https://github.com/microsoft/TypeScript/wiki/Performance). |
46 changes: 46 additions & 0 deletions
46
packages/tsconfig-reference/copy/id/options/importHelpers.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
display: "Import Helpers" | ||
oneline: "Izinkan mengimpor fungsi penunjang satu kali per proyek, termasuk menyertakan per-berkas" | ||
--- | ||
|
||
Untuk operasi penurunan tingkat tertentu, TypeScript menggunakan beberapa kode penunjang untuk operasi seperti memperluas kelas, himpunan(spread) susunan atau objek, dan menyambungkan operasi. | ||
Secara umum, penunjang ini dimasukkan ke dalam berkas yang menggunakannya. | ||
Ini dapat mengakibatkan duplikasi kode jika penunjang yang sama digunakan di banyak berkas yang berbeda. | ||
|
||
Jika `importHelpers` kode ini aktif, fungsi penunjang ini diimpor dari [tslib](https://www.npmjs.com/package/tslib) modul. | ||
Anda perlu memastikan bahwa berkas `tslib` modul dapat diimpor saat dijalankan. | ||
Ini hanya mempengaruhi modul, berkas kode tidak akan mencoba mengimpor modul. | ||
|
||
Misalnya, dengan TypeScript: | ||
|
||
```ts | ||
export function fn(arr: number[]) { | ||
const arr2 = [1, ...arr]; | ||
} | ||
``` | ||
|
||
Memasang [`downlevelIteration`](#downlevelIteration) dan `importHelpers` masih salah: | ||
|
||
```ts twoslash | ||
// @showEmit | ||
// @target: ES5 | ||
// @downleveliteration | ||
export function fn(arr: number[]) { | ||
const arr2 = [1, ...arr]; | ||
} | ||
``` | ||
|
||
Lalu aktifkan keduanya [`downlevelIteration`](#downlevelIteration) dan `importHelpers`: | ||
|
||
```ts twoslash | ||
// @showEmit | ||
// @target: ES5 | ||
// @downleveliteration | ||
// @importhelpers | ||
// @noErrors | ||
export function fn(arr: number[]) { | ||
const arr2 = [1, ...arr]; | ||
} | ||
``` | ||
|
||
Anda bisa menggunakan [`noEmitHelpers`](#noEmitHelpers) saat menyediakan implementasi untuk fungsi-fungsi ini. |
14 changes: 14 additions & 0 deletions
14
packages/tsconfig-reference/copy/id/options/importsNotUsedAsValues.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
display: "Impor Tidak Digunakan Sebagai Nilai" | ||
oneline: "Mengontrol sintaks yang Anda gunakan untuk mengimpor kata" | ||
--- | ||
|
||
Kode ini mengontrol cara kerja `import`, ada 3 opsi berbeda: | ||
|
||
- `remove`: Perilaku umum untuk menghapus pernyataan `import` yang hanya merupakan acuan dari kata. | ||
|
||
- `preserve`: Mempertahankan semua pernyataan `import` yang nilai atau katanya tidak pernah digunakan. Hal ini dapat menyebabkan impor/efek samping yang tetap dipertahankan. | ||
|
||
- `error`: Ini mempertahankan semua impor (sama seperti pilihan), tetapi akan mengalami galat jika impor nilai hanya digunakan sebagai tipe data. Ini mungkin berguna jika Anda ingin memastikan tidak ada nilai yang diimpor secara tidak sengaja, tetapi tetap membuat impor dengan jelas. | ||
|
||
Kode ini berfungsi karena Anda dapat menggunakan `import type` secara jelas dengan pernyataan `import` yang tidak boleh dimasukkan ke JavaScript. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
display: "Disertakan (_Include_)" | ||
oneline: "Berkas atau pola untuk disertakan dalam proyek ini" | ||
--- | ||
|
||
Menentukan sebuah susunan nama berkas atau contoh berkas untuk dimasukkan ke dalam program. | ||
Nama berkas ini diselesaikan dengan direktori yang berisi berkas `tsconfig.json`. | ||
|
||
```json | ||
{ | ||
"include": ["src/**/*", "tests/**/*"] | ||
} | ||
``` | ||
|
||
Yang akan mencakup: | ||
|
||
<!-- TODO: #135 | ||
```diff | ||
. | ||
- ├── scripts | ||
- │ ├── lint.ts | ||
- │ ├── update_deps.ts | ||
- │ └── utils.ts | ||
+ ├── src | ||
+ │ ├── client | ||
+ │ │ ├── index.ts | ||
+ │ │ └── utils.ts | ||
+ │ ├── server | ||
+ │ │ └── index.ts | ||
+ ├── tests | ||
+ │ ├── app.test.ts | ||
+ │ ├── utils.ts | ||
+ │ └── tests.d.ts | ||
- ├── package.json | ||
- ├── tsconfig.json | ||
- └── yarn.lock | ||
``` --> | ||
|
||
``` | ||
. | ||
├── scripts ⨯ | ||
│ ├── lint.ts ⨯ | ||
│ ├── update_deps.ts ⨯ | ||
│ └── utils.ts ⨯ | ||
├── src ✓ | ||
│ ├── client ✓ | ||
│ │ ├── index.ts ✓ | ||
│ │ └── utils.ts ✓ | ||
│ ├── server ✓ | ||
│ │ └── index.ts ✓ | ||
├── tests ✓ | ||
│ ├── app.test.ts ✓ | ||
│ ├── utils.ts ✓ | ||
│ └── tests.d.ts ✓ | ||
├── package.json | ||
├── tsconfig.json | ||
└── yarn.lock | ||
``` | ||
|
||
`include` dan `exclude` mendukung karakter untuk membuat pola _global_: | ||
|
||
- `*` cocok dengan nol atau lebih karakter (tidak termasuk pemisah direktori) | ||
- `?` cocok dengan salah satu karakter (tidak termasuk pemisah direktori) | ||
- `**/` cocok dengan direktori apa pun yang bertingkat. | ||
|
||
Jika contoh umum tidak menyertakan ekstensi berkas, maka hanya berkas dengan ekstensi yang didukung yang disertakan (misalnya `.ts`,`.tsx`, dan `.d.ts` secara default, dengan`.js` dan `. jsx` jika `allowJs` disetel ke true). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
display: "Incremental" | ||
oneline: "Simpan berkas .tsbuildinfo untuk kompilasi proyek secara bertahap" | ||
--- | ||
|
||
Memberi tahu TypeScript untuk menyimpan informasi tentang grafik proyek dari kompilasi terakhir ke berkas yang disimpan di penyimpanan. Ini membuat serangkaian berkas `.tsbuildinfo` di folder yang sama dengan keluaran kompilasi Anda. Mereka tidak menggunakan JavaScript saat runtime dan dapat dihapus dengan aman. Anda dapat membaca lebih lanjut di [3.4 release notes](/docs/handbook/release-notes/typescript-3-4.html#faster-subsequent-builds-with-the---incremental-flag). | ||
|
||
Anda dapat mengontrol nama folder dengan menggunakan pilihan [`tsBuildInfoFile`](#tsBuildInfoFile). |
34 changes: 34 additions & 0 deletions
34
packages/tsconfig-reference/copy/id/options/inlineSourceMap.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
display: "Peta Sumber Sebaris" | ||
oneline: "Sertakan berkas peta sumber di dalam JavaScript" | ||
--- | ||
|
||
Jika disetel, ketika menulis berkas `.js.map` untuk menyediakan peta sumber, TypeScript akan menyematkan konten peta sumber di berkas `.js`. | ||
Meskipun ini menghasilkan berkas JS yang lebih besar, tapi dapat memudahkan dalam beberapa tahap. | ||
Misalnya anda mungkin ingin mencoba berkas JS pada server web, tapi tidak mengizinkan berkas `.map` untuk ditampilkan. | ||
|
||
Saling terpisah dengan [`sourceMap`](#sourceMap). | ||
|
||
Misalnya, dengan TypeScript: | ||
|
||
```ts | ||
const helloWorld = "hi"; | ||
console.log(helloWorld); | ||
``` | ||
|
||
Di ubah menjadi JavaScript: | ||
|
||
```ts twoslash | ||
// @showEmit | ||
const helloWorld = "hi"; | ||
console.log(helloWorld); | ||
``` | ||
|
||
Kemudian aktifkan pembuatannya dengan `inlineSourceMap`, ada komentar di bagian bawah berkas yang menyertakan peta sumber untuk berkas tersebut. | ||
|
||
```ts twoslash | ||
// @inlineSourceMap | ||
// @showEmit | ||
const helloWorld = "hi"; | ||
console.log(helloWorld); | ||
``` |
35 changes: 35 additions & 0 deletions
35
packages/tsconfig-reference/copy/id/options/inlineSources.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
display: "Sumber Sebaris" | ||
oneline: "Sertakan berkas peta sumber di dalam JavaScript yang tampilkan" | ||
--- | ||
|
||
Jika dilihat, TypeScript akan menyertakan konten asli dari berkas `.ts` sebagai string yang disematkan di peta sumber. | ||
Ini sering kali berguna dalam kasus yang sama seperti `inlineSourceMap`. | ||
|
||
Membutuhkan `sourceMap` atau `inlineSourceMap` untuk disetel. | ||
|
||
Misalnya, dengan TypeScript: | ||
|
||
```ts twoslash | ||
const helloWorld = "hi"; | ||
console.log(helloWorld); | ||
``` | ||
|
||
Di ubah menjadi JavaScript: | ||
|
||
```ts twoslash | ||
// @showEmit | ||
const helloWorld = "hi"; | ||
console.log(helloWorld); | ||
``` | ||
|
||
Kemudian dengan `inlineSources` dan `inlineSourceMap` diaktifkan, ada komentar di bagian bawah berkas yang menyertakan peta sumber untuk berkas tersebut. | ||
Perhatikan bahwa ada yang berbeda di akhir [`inlineSourceMap`] (# inlineSourceMap) karena peta sumber sekarang berisi kode sumber asli. | ||
|
||
```ts twoslash | ||
// @inlineSources | ||
// @inlineSourceMap | ||
// @showEmit | ||
const helloWorld = "hi"; | ||
console.log(helloWorld); | ||
``` |
76 changes: 76 additions & 0 deletions
76
packages/tsconfig-reference/copy/id/options/isolatedModules.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
display: "Modul Terisolasi (_Isolated Modules_)" | ||
oneline: "Pastikan setiap berkas dapat dilihat dengan aman tanpa bergantung pada impor lain" | ||
--- | ||
|
||
Meskipun Anda dapat menggunakan TypeScript untuk menghasilkan ke kode JavaScript, penggunaan _transpiler_ lain seperti [Babel](https://babeljs.io) juga umum untuk dilakukan. Namun, _transpiler_ lain hanya beroperasi di satu berkas pada satu waktu, yang berarti mereka tidak dapat menerapkan transformasi kode yang bergantung pada pemahaman sistem tipe penuh. | ||
Pembatasan ini juga berlaku untuk API `ts.transpileModule` TypeScript yang digunakan oleh beberapa alat pengembang. | ||
|
||
Batasan ini dapat menyebabkan masalah waktu proses dengan beberapa fitur TypeScript seperti `const enum`s dan `namespace`s. | ||
Pilihan `isolatedModules` memberi tahu TypeScript untuk memperingatkan Anda jika menulis kode tertentu yang tidak dapat diartikan dengan benar oleh proses transpilasi berkas tunggal. | ||
|
||
Itu tidak mengubah kode Anda atau mengubah perilaku proses pemeriksaan dan pengecekan kode TypeScript. | ||
|
||
Beberapa contoh kode yang tidak berfungsi saat `isolatedModules` diaktifkan. | ||
|
||
#### Ekspor Pengenal Non-Nilai | ||
|
||
Di TypeScript, Anda dapat mengimpor _type_ dan kemudian mengekspornya: | ||
|
||
```ts twoslash | ||
// @noErrors | ||
import { someType, someFunction } from "someModule"; | ||
|
||
someFunction(); | ||
|
||
export { someType, someFunction }; | ||
``` | ||
|
||
Karena tidak ada nilai untuk `someType`, `export` yang ditampilkan tidak akan mencoba mengekspornya (ini akan menjadi galat waktu proses di JavaScript): | ||
|
||
```js | ||
export { someFunction }; | ||
``` | ||
|
||
_Transpiler_ satu berkas tidak tahu apakah `someType` menghasilkan nilai atau tidak, jadi itu adalah galat untuk mengekspor nama yang hanya mengacu pada sebuah tipe. | ||
|
||
#### Non-Module Files | ||
|
||
Jika `isolatedModules` dipilih, semua berkas implementasi harus dalam _modules_ (yang berarti memiliki beberapa bentuk `import` / `export`). galat terjadi jika berkas: | ||
|
||
```ts twoslash | ||
// @errors: 1208 | ||
// @isolatedModules | ||
function fn() {} | ||
``` | ||
|
||
Pembatasan ini tidak berlaku untuk berkas `.d.ts` | ||
|
||
#### Referensi ke anggota `const enum` | ||
|
||
Di TypeScript, saat mereferensikan anggota `const enum`, referensi tersebut diganti dengan nilai sebenarnya di JavaScript yang ditampilkan. | ||
|
||
Mengubah TypeScript: | ||
|
||
```ts twoslash | ||
declare const enum Numbers { | ||
Zero = 0, | ||
One = 1, | ||
} | ||
console.log(Numbers.Zero + Numbers.One); | ||
``` | ||
|
||
Ini untuk JavaScript: | ||
|
||
```ts twoslash | ||
// @showEmit | ||
// @removeComments | ||
declare const enum Numbers { | ||
Zero = 0, | ||
One = 1, | ||
} | ||
console.log(Numbers.Zero + Numbers.One); | ||
``` | ||
|
||
Tanpa pengetahuan tentang nilai anggota ini, _transpiler_ lain tidak dapat menggantikan referensi ke `Number`, yang akan menjadi galat dijalankan jika dibiarkan (karena tidak ada objek `Numbers` pada waktu proses). | ||
Karena itu, ketika `isolatedModules` dipilih, akan terjadi galat yang mereferensikan anggota `const enum` di sekelilingnya. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
penunjang ini apa sih bahasa Inggrisnya?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import Helpers
mas.saya sudah merubah itu dengan mengembalikan ke kalimat bahasa inggris nya mas