Closed cyberwombat closed 12 months ago
The last 2 versions have major bugs. So 0.0.14 should be used atm. I need to release a new one with current changes
Are you loading it from a module or in a cjs package? I dont have any errors in either case so I am a bit confused. Can you give more context?
My codebase is module (i.e. "type": "module") and typescript. Perhaps an issue with node resolution?
TSConfig
{
"include": ["./**/*.d.ts", "./**/*.ts", "./**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"module": "ES2022",
"target": "ES2022",
"strict": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"baseUrl": ".",
"types": ["@shopify/oxygen-workers-types", "@types/node"],
"paths": {
"~/*": ["app/*"]
},
"noEmit": true
}
}
Oh i see, this is a problem with the typings then. Someone recently added svgdom types to definitely typed and they got merged but they are not complete it seems. You probably should open an issue at definitely typed then
thanks yes that's it.
I am trying to use the font functions: setFontDir, setFontFamilyMappings, preloadFonts.
I have tried both 0.1.16 and direct pull of master with same result. Here's what I get with current master:
If I try direct path it works but I get that missing type error (but code works)
On a side note - why does NPM.js say package is deprecated, dont use etc but no mention at all here?
Thanks!