Argument types do not match parameters
See original GitHub issueIf I use $t in a script element like this:
<script lang="ts">
import {t} from '$lib/i18n';
export let placeholder = $t('search.placeholder');
</script>
PhpStorm shows an error:
Argument types do not match parameters
Placing it inside the template/HTML part …
<input placeholder={$t('search.placeholder')}/>
… does not.
I’m not sure this is a problem with sveltekit-i18n, but I have no idea why this happens. The translation is actually working, it is just the IDE complaining and marking files as erroneous.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
express app.get function gives "Argument types do not match ...
When I remove the @types/express package, WebStorm no longer gives the error message, but the TypeScript compiler gives a error TS2307: Cannot ...
Read more >Incorrect TypeScript "Argument types do not match parameters"
The ({}) in the last line has a squiggly red underline and shows the error "Argument types do not match parameters". However the...
Read more >Why Do the Input Argument Types Not Match When I Invoke a ...
If you invoke a method and you get an error that says that the input argument types do not match, the method that...
Read more >Arguments types do not match parameter warning in tutorial ...
I don't think this is a problem with the tutorial. It seems to be an issue with the Typescript compiler in Webstorm/PHPstorm.
Read more >Argument does not match forward declaration
Change the data type of the indicated parameter in the declaration or the definition of the procedure so that they match. The data...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The config looks like:
for now (separation into modules is planned, but not done yet).
In
__layout.svelte
I just call:inside the load function.
Version: 2.0.0-rc.6
Well, the weird thing is, that it worked in regular
.ts
…🤔