Skip to content

Commit d6348a9

Browse files
authored
230. satırdı kaldım
1 parent 7fb81e9 commit d6348a9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

1-js/13-modules/02-import-export/article.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,43 +190,43 @@ import *!*User*/!* from './user.js'; // {User} değir, sadece User
190190
new User('John');
191191
```
192192
193-
Imports without curly braces look nicer. A common mistake when starting to use modules is to forget curly braces at all. So, remember, `import` needs curly braces for named imports and doesn't need them for the default one.
193+
Süslü parantezler olmadan içeri aktarmalar daha güzel görünür. Modülleri kullanmaya başlarken görülen yaygın hatalardan biri süslü parantezleri tamamen unutmaktır. Bu nedenle, unutmayın. `import` adlandırılmış içeriye aktarma işlemleri için süslü parantezler gereklidir ama varsayılan için bunlara gerek yoktur.
194194
195-
| Named export | Default export |
195+
| Adlandırılmış İçeriye Aktarılanlar | Varsayılan İçeriye Aktarılanlar |
196196
|--------------|----------------|
197197
| `export class User {...}` | `export default class User {...}` |
198198
| `import {User} from ...` | `import User from ...`|
199199
200-
Naturally, there may be only one "default" export per file.
200+
Doğal olarak, dosya başına yalnızca bir "varsayılan" dışa aktarma olabilir.
201201
202-
We may have both default and named exports in a single module, but in practice people usually don't mix them. A module has either named exports or the default one.
202+
Tek bir modülde hem varsayılan hem de adlandırılmış içeriye aktarma yapabiliriz ancak pratikte insanlar genellikle bunu karıştırmaz. Bir modül, dışa aktarma adını verir veya varsayılan olanıdır.
203203
204-
**Another thing to note is that named exports must (naturally) have a name, while `export default` may be anonymous.**
204+
**Unutulmaması gereken bir başka şey de, dışa aktarma adının (doğal olarak) bir adı olması gerekirken, `export default` adsız olabilir**
205205
206-
For instance, these are all perfectly valid default exports:
206+
Örneğin, Bunların hepsi mükemmel ve doğru `default export` kullanımları:
207207
208208
```js
209-
export default class { // no class name
209+
export default class { // sınıf adı yok
210210
constructor() { ... }
211211
}
212212
213-
export default function(user) { // no function name
213+
export default function(user) { // fonksiyon adı yok
214214
alert(`Hello, ${user}!`);
215215
}
216216
217-
// export a single value, without making a variable
217+
// bir değişken yapmadan tek bir değer dışarıya aktar
218218
export default ['Jan', 'Feb', 'Mar','Apr', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
219219
```
220220
221-
That's fine, because `export default` is only one per file. Contrary to that, omitting a name for named imports would be an error:
221+
Bu iyi çünkü `export default` dosya başına yalnızca bir tanesidir. Bunun aksine, adlandırılmış içeriye aktarma için bir adın çıkarılması bir hata olur:
222222
223223
```js
224-
export class { // Error! (non-default export needs a name)
224+
export class { // Hata! (non-default export needs a name)
225225
constructor() {}
226226
}
227227
```
228228
229-
### "Default" alias
229+
### "Default" Takma Adı
230230
231231
The "default" keyword is used as an "alias" for the default export, for standalone exports and other scenarios when we need to reference it.
232232

0 commit comments

Comments
 (0)