Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argBodyにundefinedを含む場合はinvalidにする。テストコードの追加 #85

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ShuzoN
Copy link
Owner

@ShuzoN ShuzoN commented May 10, 2022

ref: #84

テストコード足したいのとsplitする前にそもそもundefinedだったら落とすようにする。

@ShuzoN
Copy link
Owner Author

ShuzoN commented May 10, 2022

@IkezoeMakoto

throw new Error(
"引数が正しく渡されていません。もう一度helpを見てください。"
);
}

const args = body.text?.split(" ");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nullは考慮しなくてもOKですか?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/ShuzoN/zut/blob/master/src/Types/lambda.ts#L2

stringってnull許容でしたっけ?(覚えてない)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このtypesが正しければ大丈夫です!
emptyの場合はundefinedではなくnullをセットするライブラリが多いので、lambdaはどうなのかなと思ったところでした。

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あーたしかに。types/aws-lambdaみときます

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants