we ship our source typescript, and the comiled javascript along with typehints.
lets also make this package work with deno's native typescxript support
example package.json
{
"name": "my-hybrid-package",
"version": "1.0.0",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"deno": "./src/index.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
}
}
we ship our source typescript, and the comiled javascript along with typehints.
lets also make this package work with deno's native typescxript support
example package.json
{ "name": "my-hybrid-package", "version": "1.0.0", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { "deno": "./src/index.ts", "types": "./dist/index.d.ts", "import": "./dist/index.js", "require": "./dist/index.cjs" } } }