-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: apply correct type information to $derived
argument expression
#430
Conversation
🦋 Changeset detectedLatest commit: 6953da6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Pull Request Test Coverage Report for Build 6905719951
💛 - Coveralls |
If |
I don't think falsy value has much to do with it. type Info1 = { n: number };
type Info2 = { n: string };
let a = $state<Info1 | Info2>({ n: 1 });
a = { n: 1 }
let b = $derived(a.n);
// ^? b: number
let c = $derived((() => {
// ^? c: string | number
return $__derivedArgument();
function $__derivedArgument() {
return a.n
}
})()); |
No description provided.