Enhance: TypeScriptの型を厳格化 by takejohn · Pull Request #891 · aiscript-dev/aiscript
Navigation Menu
{{ message }}
aiscript-dev / aiscript Public
- Notifications You must be signed in to change notification settings
- Fork 39
Open
takejohn wants to merge 21 commits intoaiscript-dev:masterfrom
Open
takejohn wants to merge 21 commits intoaiscript-dev:masterfrom
takejohn wants to merge 21 commits intoaiscript-dev:masterfrom
Conversation
Copy link
Member
takejohn
commented
Dec 31, 2024
takejohn
commented
What
asや!による型アサーションを減らします。CharStreamのeofやcharがgetterであるために意図しないnarrowingが発生していたので通常のメソッドに変更します。- パーサのプラグインで用いる
visitNode関数にジェネリクスを使用します。 Ast.Forの型を変更し、(varおよびfrom,to)またはtimesのどちらかが必須となるようにします。Tokenの型を変更し、識別子やリテラルの場合はvalueを、テンプレートリテラルの場合はchildrenを必須にします。
Why
Resolve #880
Additional info (optional)
takejohn added 15 commits
December 26, 2024 16:44Copy link
⚠️ Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 98.93238% with 3 lines in your changes missing coverage. Please review.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/error.ts | 66.66% | 2 Missing ⚠️ |
| src/interpreter/index.ts | 96.96% | 1 Missing ⚠️ |
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/interpreter/primitive-props.ts | 98.07% <100.00%> (+0.09%) |
⬆️ |
| src/interpreter/scope.ts | 93.69% <100.00%> (+3.15%) |
⬆️ |
| src/node.ts | 85.71% <ø> (-12.66%) |
⬇️ |
| src/parser/plugins/validate-jump-statements.ts | 100.00% <100.00%> (ø) |
|
| src/parser/plugins/validate-keyword.ts | 95.67% <100.00%> (+7.06%) |
⬆️ |
| src/parser/plugins/validate-type.ts | 100.00% <100.00%> (+17.64%) |
⬆️ |
| src/parser/scanner.ts | 95.22% <100.00%> (+6.46%) |
⬆️ |
| src/parser/streams/char-stream.ts | 90.47% <100.00%> (+1.98%) |
⬆️ |
| src/parser/streams/token-stream.ts | 79.62% <ø> (+16.18%) |
⬆️ |
| src/parser/syntaxes/common.ts | 96.82% <100.00%> (+7.29%) |
⬆️ |
| ... and 9 more |
takejohn added 2 commits
January 3, 2025 17:43FineArchs reviewed Jan 10, 2025
src/interpreter/primitive-props.ts
Show resolved
Hide resolved
src/interpreter/primitive-props.ts Show resolved Hide resolved
FineArchs approved these changes Jan 10, 2025
takejohn added 2 commits
January 12, 2025 14:50
src/interpreter/scope.ts
Outdated
Show resolved
Hide resolved
src/interpreter/scope.ts Outdated Show resolved Hide resolved
FineArchs
requested review from
kakkokari-gtyih,
salano-ym,
syuilo and
uzmoi
salano-ym reviewed Jan 19, 2025
src/node.ts
Show resolved
Hide resolved
src/node.ts Show resolved Hide resolved
src/parser/visit.ts
Outdated
Show resolved
Hide resolved
src/parser/visit.ts Outdated Show resolved Hide resolved
Co-authored-by: salano_ym <53254905+salano-ym@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment