|
|
@@ -77,8 +77,8 @@ if (a === b) |
|
|
|
function
|
|
|
|
the_function (
|
|
|
|
int $arg_a,
|
|
|
|
string $arg_b):
|
|
|
|
bool
|
|
|
|
string $arg_b)
|
|
|
|
: bool
|
|
|
|
{
|
|
|
|
hoge ();
|
|
|
|
}
|
|
|
@@ -94,4 +94,16 @@ theFunction (argA, argB) |
|
|
|
{
|
|
|
|
hoge ();
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
TypeScript の場合は,かならず型を明記し,次のやぅにします:
|
|
|
|
```typescript
|
|
|
|
function
|
|
|
|
theFunction (
|
|
|
|
argA: number,
|
|
|
|
argB: string)
|
|
|
|
: boolean
|
|
|
|
{
|
|
|
|
hoge ();
|
|
|
|
}
|
|
|
|
``` |