Closed as duplicate of#494
Description
I am trying to publish a tiny utility to test jsr. I really do not want to write typescript, I am ok with providing good typescript support.
why is jsr having issue with this index.js
/**
* Map string values returned by {URLSearchParams} to boolean.
* /?param - empty string -> true
* /?param=1 - "1" -> true
* /?param=true - "true" -> true
*
* false otherwise
*
* @param {string|null} val
* @returns {boolean} boolean
*/
export const urlBool = val => {
if (val === '' || val === '1' || val === 'true') return true
return false
}
npx jsr publish --dry-run
gives this warning
warning[unsupported-javascript-entrypoint]: used a JavaScript module without type declarations as an entrypoint
--> C:\wrk\jsx6\libs\url-util\index.js
= hint: add a type declaration (d.ts) for the JavaScript module, or rewrite it to TypeScript
info: JavaScript files with no corresponding declaration require type inference to be type checked
info: fast check avoids type inference, so JavaScript entrypoints should be avoided
I am open to suggestions how to improve the above, if it is possible without too much hassle. jsr.io is a nice idea, but for me ATM is too agressive.