-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
This works:
"formatted_percentage": [
{
"declarations": ["input value", "local formattedValue = value: number"],
"match": {
"value=*": "{formattedValue}%"
}
}
],
This
"formatted_percentage": [
{
"declarations": [
"input value",
"local formattedValue = value: number minimumFractionDigits=1 maximumFractionDigits=1"
],
"match": {
"value=*": "{formattedValue}%"
}
}
],
Makes svelte-check annoyed:
src/lib/paraglide/messages/en-us.js:513:62
Error: Type 'string' is not assignable to type 'number'.
export const formatted_percentage = /** @type {(inputs: Formatted_PercentageInputs) => LocalizedString} */ (i) => {
const formattedValue = registry.number("en-us", i?.value, { minimumFractionDigits: "1", maximumFractionDigits: "1" });return /** @type {LocalizedString} */ (`${formattedValue}%`)
};
To work around it I had to change checkJs to false on tsconfig.json.
Adding the folder to the tsconfig excludes did not work as it is a direct dependency and svelte will always check direct dependencies
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels