We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3bd9f44 + 258c759 commit d2464c1Copy full SHA for d2464c1
docs/4-advanced/03-typescript/index.md
@@ -411,10 +411,12 @@ Vite は、標準で TypeScript のトランスパイラが内蔵されていま
411
412
もしこのコードが通る場合、実際に渡された `{name: "Tanaka", math: 100}` には存在しないはずの `science` プロパティにアクセスできてしまうことになります。このようなことを防ぐために、引数の型が小さい集合になればなるほど、関数の型は大きな集合になる必要があります。
413
414
-4. ```typescript
415
- function apply<T, U>(f: (x: T) => U, x: T): U {
416
- return f(x);
417
- }
+4. 以下のコード
+
+ ```typescript
+ function apply<T, U>(f: (x: T) => U, x: T): U {
418
+ return f(x);
419
+ }
420
```
421
422
<ViewSource url={import.meta.url} path="_samples/apply" noCodeSandbox />
0 commit comments