Skip to content

Commit c03fdae

Browse files
committed
change type
1 parent 3bb1685 commit c03fdae

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

etc/aiscript.api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ type Fn = NodeBase & {
270270
type: 'fn';
271271
args: {
272272
name: string;
273-
optional?: boolean;
273+
optional: boolean;
274274
default?: Expression;
275275
argType?: TypeSource;
276276
}[];

src/node.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export type Fn = NodeBase & {
175175
type: 'fn'; // 関数
176176
args: {
177177
name: string; // 引数名
178-
optional?: boolean;
178+
optional: boolean;
179179
default?: Expression; // 引数の初期値
180180
argType?: TypeSource; // 引数の型
181181
}[];

src/parser/syntaxes/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function parseParams(s: ITokenStream): { name: string, argType?: Ast.Node
2626
const name = s.token.value!;
2727
s.next();
2828

29-
let optional;
29+
let optional = false;
3030
if ((s.kind as TokenKind) === TokenKind.Question) {
3131
s.next();
3232
optional = true;

0 commit comments

Comments
 (0)