You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TSError: TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
src/utils/logging.ts:2:27 - error TS7016: Could not find a declaration file for module 'log4js/lib/appenders/recording'. '/project/node_modules/log4js/lib/appenders/recording.js' implicitly has an 'any' type.
Try `npm install @types/log4js` if it exists or add a new declaration (.d.ts) file containing `declare module 'log4js/lib/appenders/recording';`
2 import { recording } from 'log4js/lib/appenders/recording';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Is there a way for me to import this appender in typescript?
The text was updated successfully, but these errors were encountered:
It's defined in types/log4js.d.ts but that's from the perspective of using log4js.configure with a recording appender in the config rather than importing it directly in a test. I don't use typescript, so I rely on users to help me with the types - so if you feel like making a PR with the changes you need that would be awesome.
I have not been able to figure out how to do this yet in the source project, however, so far have been able to use this in my project under typings/recording.d.ts:
Doesn't look like the types for the recording appender are defined maybe?
Outputs:
Is there a way for me to import this appender in typescript?
The text was updated successfully, but these errors were encountered: