Comments (21)
I believe I have fixed the problem with v0.8.4 now. Although File
extends Blob
, it seems that TypeScript v4.9.3 no longer maps T extends File
correctly. I have implemented a workaround for now.
from modular-forms.
The fix worked, thanks @fabian-hiller !
from modular-forms.
Can confirm it fixed it for me as well. Thanks @fabian-hiller for the quick responses and a great library!
from modular-forms.
That is interesting. I also have strict
set to true
. Even in the tsconfig.js
of Modular Forms. Does skipLibCheck
set to true
help maybe? Otherwise, can you send me the link to the Stackblitz project?
from modular-forms.
Adding skipLibCheck: false
didn't change anything. The Stackblitz I'm referring to is just based on the Solid/Typescript template from their front page, which I downloaded and added the other dependencies/config manually. I could perhaps make a repo with just that if you like.
from modular-forms.
false
is the default value. Please test it with skipLibCheck: true
. Yes a repo would be helpful.
from modular-forms.
Sorry, meant to say true
when I wrote that. In any case, I tried it with both true/false
and neither worked. Here is a repo of the sample project. You should see the error in App.tsx
and when you change strict: true
in tsconfig.json
the error should go away.
https://github.com/alexss3/solid-modular-forms
from modular-forms.
I could not reproduce it. No error occurs for me. I cloned the repository and strict
was already true
. Maybe try to update your packages to the latest version.
from modular-forms.
Ok, I just tried it on my personal laptop and got the same error message. I probably have a very similar setup with VS Code and could be the cause, though I'm not exactly sure what I should look for to find the root cause of it.
On my laptop I disabled a couple extensions [Javascript and TypeScript Nightly, Prettier] and saw it go away, but can't reproduce the symptom to know which one it was. On my other machine I tried the same and cannot get the error to go away at all, even after disabling all VS Code extensions. Very strange indeed.
from modular-forms.
@alexss3 do you have any updates for me? Were you able to solve the problem?
from modular-forms.
I am also encountering this problem, but on Emacs (using the vscode typescript LSP server though).
skipLibCheck: true is also enabled in my setup
from modular-forms.
I will look at the problem again. It's just difficult because I can't reproduce it properly.
from modular-forms.
I had the same issue and adding "skipDefaultLibCheck": true
to my tsconfig.json
fixed it for me. 🤷♂️
from modular-forms.
I have made a few changes to the types and tried to solve the problem. Since I still can't reproduce it on my computer, I don't know if the changes were successful. Can you upgrade the library to v.0.8.3 and also upgrade TypeScript and check if it is solved. If TypeScript is installed globally, I also recommend updating the global version.
from modular-forms.
I updated to the latest version of Typescript and @modular-forms/solid and have skipLibCheck
set to true
and skipDefaultLibCheck
set to false
and the problem still exists.
I'll try and create a repo that reproduces the issue and add it to Github tomorrow.
from modular-forms.
After some investigation, I suspect that this is a problem that only exists with older TypeScript versions. The editors do not always use the version specified in package.json by default. In VS Code, for example, you can click "{}" in the status bar at the bottom of the screen to select the version. Can you check which version is shown there and if the error messages disappear when you upgrade to TypeScript v4.9.3?
from modular-forms.
It's definitely not the Typescript version. It took me a bit to reproduce but I eventually got it with a minimal case.
The problem is if you have @types/node
installed then the type of console.log
becomes a Blob and that triggers an infinite loop on the ValuePath
and ValuePaths
types.
You can find my reproduction here: https://github.com/durandj/module-forms-solid-4-repro
The real fix in my case was to replace the onSubmit
handler which I had set to console.log
for testing with literally anything else lol.
from modular-forms.
@durandj for me, no error occurs when I clone your repository and install the npm packages.
from modular-forms.
from modular-forms.
You are right, when running pnpm run lint
the error occurred. I have found a way to reproduce the problem. When I click on "{}" in the status bar in VS Code, TypeScript v4.8.4 is displayed and no error occurs. If I switch to v4.9.3 I get the error. When I downgrade TypeScript with pnpm i -D [email protected]
and then run pnpm run lint
the error does not occur.
If it's due to the new TypeScript version, that also explains why the problem has only been occurring for a few days. In this case, I recommend downgrading to v4.8.4 until there is a solution to the problem.
from modular-forms.
Thank you for your help!
from modular-forms.
Related Issues (20)
- Type error when using `setValue` on valibot optional nested field. HOT 1
- Clearly indicate that ‘Qwik City’ is needed to use the ‘Qwik’ version. HOT 4
- Difficulties with SetValues API HOT 1
- Dealing with custom/arbitrary inputs HOT 3
- QWIK: How would you format currencies with $ preffix and with nice formatting for numbers with commas, HOT 7
- validateOn custom events. HOT 2
- Can't add `style` or `class` to `Form` componenet
- Types don't work with Qwik's built-in class array syntax HOT 1
- qwik: toTrimmed return value rise error question HOT 1
- Feature Request : Add the possibility to have a function to set data directly in field HOT 2
- QWIK: How to test input fields? HOT 4
- SolidJS: Unable to get values of fields that have never been active using `getValues(formStore, { shouldActive: false })` HOT 1
- Typescript error after updating to Qwik 1.3.0 HOT 5
- Qwik Change/Focus events are deprecated HOT 2
- focus on form submission : the order of keys in formLoader matters HOT 1
- setResponse and throwing FormError doesn't work anymore HOT 10
- (Qwik) Empty form with Firefox autofill HOT 3
- define form without defualt values HOT 1
- Next App directory support HOT 2
- sveltekit support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modular-forms.