Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/docs/ja/basics/layouts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const { frontmatter } = Astro.props;
</html>
```

`MarkdownLayoutProps`を使用して、レイアウトの[`Props`型](/ja/guides/typescript/#component-props)を設定できます。
`MarkdownLayoutProps`を使用して、レイアウトの[`Props`型](/ja/guides/typescript/#コンポーネントのprops)を設定できます。

```astro title="src/layouts/BlogPostLayout.astro" ins={2,4-9}
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/guides/integrations-guide/alpinejs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default (Alpine: Alpine) => {

## TypeScriptのインテリセンス

`@astrojs/alpine`インテグレーションは、[グローバルウィンドウオブジェクト](/ja/guides/typescript/#window-and-globalthis)に`Alpine`を追加します。IDEのオートコンプリートのために、`src/env.d.ts`に以下を追加します。
`@astrojs/alpine`インテグレーションは、[グローバルウィンドウオブジェクト](/ja/guides/typescript/#windowとglobalthis)に`Alpine`を追加します。IDEのオートコンプリートのために、`src/env.d.ts`に以下を追加します。

```ts title="src/env.d.ts"
interface Window {
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/guides/integrations-guide/netlify.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const {
<h1>{city}から来たフレンドリーな訪問者さん、こんにちは!</h1>
```

TypeScriptを使用している場合は、`src/env.d.ts`を更新して`NetlifyLocals`を使用することで、[適切な型指定を取得](/ja/guides/typescript/#extending-global-types)できます。
TypeScriptを使用している場合は、`src/env.d.ts`を更新して`NetlifyLocals`を使用することで、[適切な型指定を取得](/ja/guides/typescript/#グローバル型の拡張)できます。

```ts title="src/env.d.ts"
type NetlifyLocals = import('@astrojs/netlify').NetlifyLocals
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/guides/integrations-guide/vercel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ export default defineConfig({
});
```

エッジミドルウェアは、`ctx.locals.vercel.edge`としてVercelの[`RequestContext`](https://vercel.com/docs/functions/edge-middleware/middleware-api#requestcontext)にアクセスできます。TypeScriptを使用している場合は、`src/env.d.ts`を更新して`EdgeLocals`を使用することで、[適切な型指定を取得](/ja/guides/typescript/#extending-global-types)できます。
エッジミドルウェアは、`ctx.locals.vercel.edge`としてVercelの[`RequestContext`](https://vercel.com/docs/functions/edge-middleware/middleware-api#requestcontext)にアクセスできます。TypeScriptを使用している場合は、`src/env.d.ts`を更新して`EdgeLocals`を使用することで、[適切な型指定を取得](/ja/guides/typescript/#グローバル型の拡張)できます。

```ts
type EdgeLocals = import('@astrojs/vercel').EdgeLocals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Astroは静的HTMLを出力するため、ビルド後のファイルを使っ

### CRAのインポートをAstroに変換

[ファイルインポート](/ja/guides/imports/)を必ず正しい相対パスで記述します。[インポートエイリアス](/ja/guides/typescript/#import-aliases)を使うか、フルパスを書くかのいずれかです。
[ファイルインポート](/ja/guides/imports/)を必ず正しい相対パスで記述します。[インポートエイリアス](/ja/guides/typescript/#インポートエイリアス)を使うか、フルパスを書くかのいずれかです。

`.astro`を含む一部のファイル型は**拡張子を省略できません**。拡張子まで明示してインポートしてください。

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/guides/sessions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const onRequest = defineMiddleware(async (context, next) => {

デフォルトではセッションデータには型がなく、任意のキーに任意のデータを保存できます。値は[devalue](https://github.com/Rich-Harris/devalue)を使用してシリアライズ・デシリアライズされます。これはコンテンツコレクションやアクションで使用されているのと同じライブラリです。そのため、サポートされる型も同じで、文字列、数値、`Date`、`Map`、`Set`、`URL`、配列、プレーンなオブジェクトが含まれます。

`src/env.d.ts`ファイルを作成し、`App.SessionData`型の宣言を追加することで、セッションデータの[TypeScript型を定義](/ja/guides/typescript/#extending-global-types)することもできます。
`src/env.d.ts`ファイルを作成し、`App.SessionData`型の宣言を追加することで、セッションデータの[TypeScript型を定義](/ja/guides/typescript/#グローバル型の拡張)することもできます。

```ts title="src/env.d.ts"
declare namespace App {
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ja/guides/syntax-highlighting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Astroで使用する場合は次に注意します。
- [`<Code />`](#code-)(Shikiベース)
- [`<Prism />`](#prism-)(Prismベース)

各コンポーネントの`Props`は[`ComponentProps`型](/ja/guides/typescript/#componentprops-type)で参照できます。
各コンポーネントの`Props`は[`ComponentProps`型](/ja/guides/typescript/#componentprops型)で参照できます。

### `<Code />`

Expand Down
Loading
Loading