tempus
tempus copied to clipboard
typescript support
I have this type error when i use Tempus.add :
Property 'add' does not exist on type 'r'
adding // @ts-ignore does the trick but it's still good to have a type declaration
I also get a typescript error when using this in a next.js 14 project.
Could not find a declaration file for module '@studio-freight/tempus'. '/Users/pixply/project/node_modules/@studio-freight/tempus/dist/tempus.modern.mjs' implicitly has an 'any' type.
Try `npm i --save-dev @types/studio-freight__tempus` if it exists or add a new declaration (.d.ts) file containing `declare module '@studio-freight/tempus';`ts(7016)
adding
"types": "./dist/types/index.d.ts"
to package.json in "exports": {} would help...
https://github.com/studio-freight/tempus/blob/067bd998100e9c37be6462d3d996be742875cac7/package.json#L15-L18
it should be fixed in v0.0.40
I might not get it, but for me now the types directory and the index.d.ts file a completely gone... So I still get the typescript error in Next JS. Leaving these files and just adding the mentioned line to package.js would have done the trick, I think. And also the import is now broken, since the module is gone.
import Tempus from '@studio-freight/tempus';
Cannot find module '@studio-freight/tempus' or its corresponding type declarations
mb @pixply, can you try v0.0.41 ?
The same
I might not get it, but for me now the
typesdirectory and theindex.d.tsfile a completely gone... So I still get the typescript error in Next JS. Leaving these files and just adding the mentioned line topackage.jswould have done the trick, I think. And also the import is now broken, since the module is gone.import Tempus from '@studio-freight/tempus';Cannot find module '@studio-freight/tempus' or its corresponding type declarations
Also occurs for me, 0.0.42
my bad, will be fixed asap, thx
0.0.44 fixes it @vhorzinek