Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: apply correct type information to$derived argument expression#430

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
baseballyama merged 4 commits intomainfromrunes-type-scope
Nov 20, 2023

Conversation

@ota-meshi
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-botbot commentedNov 17, 2023
edited
Loading

🦋 Changeset detected

Latest commit:6953da6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
svelte-eslint-parserMinor

Not sure what this means?Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coveralls
Copy link

coveralls commentedNov 17, 2023
edited
Loading

Pull Request Test Coverage Report forBuild 6905719951

  • 69 of72(95.83%) changed or added relevant lines in4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to91.318%

Changes Missing CoverageCovered LinesChanged/Added Lines%
src/parser/typescript/set-parent.ts5683.33%
src/parser/typescript/analyze/index.ts495196.08%
TotalsCoverage Status
Change from baseBuild 6901776316:0.06%
Covered Lines:2386
Relevant Lines:2528

💛 -Coveralls

@ota-meshiota-meshi mentioned this pull requestNov 17, 2023
18 tasks
@baseballyama
Copy link
Member

@ota-meshi
Copy link
MemberAuthor

ota-meshi commentedNov 20, 2023
edited
Loading

I don't think falsy value has much to do with it.
So I think$derived should always be converted to virtual code.

typeInfo1={n:number};typeInfo2={n:string};leta=$state<Info1|Info2>({n:1});a={n:1}letb=$derived(a.n);//  ^? b: numberletc=$derived((()=>{//  ^? c: string | numberreturn$__derivedArgument();function$__derivedArgument(){returna.n}})());

https://typescript-eslint.io/play/#ts=5.2.2&fileType=.ts&code=FAEwpgxgNghgTmABAMwK4DsIBcCWB7dRAEgGcsYswAeAFQD4AKHdHXGKALkRoEouaA3KEiwEKDNnyFS5SrUZ9uiAD6IM4ZMzAgh4aPCRpMuAsXBwcAN23yGYAB4AHBCRJT%2BiwcCwBPR0gBJdGQ8AEZEAF5EAG9EdC50VABbACMwOEQAXyFff0QgkIAmSJi4rjILdABzLKEoMCxEGBKZCmoCsJV84LxCxlj4xHDMniFmqIGuYeB6xpSW8yttBhgAOnRR4AB6LcREAD0AfkQUhOS0uBmGxAgF9KWQBieeSLoY7d2D44hyrEqa1SJVLpYB7BBYVBwaQAfWhi2sIAAgnAqskwOgsAxNnsjJJTERYfDtMjUUl0ZiXtFQXtEODIYQ1uhqZlgCMsZsgA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tieQEMAZolp9oAc1gBbRC3RRE0aB2iRwYAL4h1QA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eFYDAruuGAL4g9A&tokens=false

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@baseballyamabaseballyamabaseballyama approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@ota-meshi@coveralls@baseballyama

[8]ページ先頭

©2009-2025 Movatter.jp