In my TypeScript project, I use DefinitelyTyped definitions for external js dependencies.
Sometimes it might happen that these definitions are outdated. It might als
I was able to accomplish this by following the directions at https://www.credera.com/blog/technology-solutions/typescript-adding-custom-type-definitions-for-existing-libraries/. There they use the example of react
.
import 'react';
declare module 'react' {
interface OlHTMLAttributes {
type?: "1" | "a" | "A" | "i" | "I";
}
}
I found this works really well for winston
too.