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

Type conflict when setting Pointer<boolean>.val #105

Open
asbng opened this issue Jun 3, 2024 · 1 comment
Open

Type conflict when setting Pointer<boolean>.val #105

asbng opened this issue Jun 3, 2024 · 1 comment

Comments

@asbng
Copy link
Member

asbng commented Jun 3, 2024

Reproducible Example

UIX - frontend/example.ts:

const booleanPointer = $$(false);
booleanPointer.val = true;

Versions

UIX: 0.2.5
DATEX: 0.1.4

Issue

Setting a boolean pointer's .val to a boolean value is expected to work without showing type warnings. While the code above works as intended, the Deno TypeScript linter will show the following type conflict for line 2:

Type 'boolean' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'boolean'. deno-ts(2322)

This does not happen for string and number pointers.

@benStre
Copy link
Member

benStre commented Jun 14, 2024

This was an issue with older Deno/TS versions and should no longer happen (see microsoft/TypeScript#56320)

Can you confirm that this?

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

No branches or pull requests

2 participants