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
Typescript can't see any type definition for LogFnAsError and treats it as any. When using @typescript-eslint/eslint-plugin in a project, a lint error for the rule @typescript-eslint/no-unsafe-call is emitted for customLogger.error.
Expected behavior
customLogger.error(...) and customLogger.fatal(...) are typed correctly.
The text was updated successfully, but these errors were encountered:
Describe the bug
After 78334b3 the types in https://github.com/maraisr/diary/blob/a723e0b203321faa6a95195c9991c2cf74c67427/src/index.d.ts are broken. Specifically, a type definition for
LogFnAsError
is now missing.This means that any use of
customLogger.error(...)
andcustomLogger.fatal(...)
in a typescript project doesn't work as expected.To reproduce
Typescript can't see any type definition for
LogFnAsError
and treats it asany
. When using@typescript-eslint/eslint-plugin
in a project, a lint error for the rule@typescript-eslint/no-unsafe-call
is emitted forcustomLogger.error
.Expected behavior
customLogger.error(...)
andcustomLogger.fatal(...)
are typed correctly.The text was updated successfully, but these errors were encountered: